]> git.saurik.com Git - redis.git/blobdiff - src/db.c
Clear the AOF rewrite scheduled flag once an AOF rewrite is triggered. Fix for issue...
[redis.git] / src / db.c
index 9620b6e8f640f10cbecf6172642aadc2d9be2de2..cc9810b6bdebe5b2254e5ef46c517608491cde95 100644 (file)
--- a/src/db.c
+++ b/src/db.c
@@ -213,7 +213,13 @@ void flushallCommand(redisClient *c) {
         kill(server.bgsavechildpid,SIGKILL);
         rdbRemoveTempFile(server.bgsavechildpid);
     }
-    rdbSave(server.dbfilename);
+    if (server.saveparamslen > 0) {
+        /* Normally rdbSave() will reset dirty, but we don't want this here
+         * as otherwise FLUSHALL will not be replicated nor put into the AOF. */
+        int saved_dirty = server.dirty;
+        rdbSave(server.dbfilename);
+        server.dirty = saved_dirty;
+    }
     server.dirty++;
 }