]> git.saurik.com Git - redis.git/blobdiff - src/aof.c
TODO updated after moving more things into the github issues system
[redis.git] / src / aof.c
index 5417e76b14339eeb4aa84d73deb32801db4b9e38..8d65428182d6f32dea7749df6981205c85697640 100644 (file)
--- a/src/aof.c
+++ b/src/aof.c
@@ -95,12 +95,13 @@ void flushAppendOnlyFile(int force) {
                 server.aof_flush_postponed_start = server.unixtime;
                 return;
             } else if (server.unixtime - server.aof_flush_postponed_start < 2) {
-                /* We were already writing for fsync to finish, but for less
+                /* We were already waiting for fsync to finish, but for less
                  * than two seconds this is still ok. Postpone again. */
                 return;
             }
             /* Otherwise fall trough, and go write since we can't wait
              * over two seconds. */
+            redisLog(REDIS_NOTICE,"Asynchronous AOF fsync is taking too long (disk is busy?). Writing the AOF buffer without waiting for fsync to complete, this may slow down Redis.");
         }
     }
     /* If you are following this code path, then we are going to write so
@@ -325,6 +326,8 @@ int loadAppendOnlyFile(char *filename) {
         }
         if (buf[0] != '*') goto fmterr;
         argc = atoi(buf+1);
+        if (argc < 1) goto fmterr;
+
         argv = zmalloc(sizeof(robj*)*argc);
         for (j = 0; j < argc; j++) {
             if (fgets(buf,sizeof(buf),fp) == NULL) goto readerr;