]> git.saurik.com Git - redis.git/commitdiff
DEBUG FLUSHCACHE needs to wait that everything was synched on disk
authorantirez <antirez@gmail.com>
Sun, 9 Jan 2011 18:01:44 +0000 (19:01 +0100)
committerantirez <antirez@gmail.com>
Sun, 9 Jan 2011 18:01:44 +0000 (19:01 +0100)
src/debug.c

index 49f7ab2ac46c9fda45c25053926d1648ed1ce6c5..d2d14cdba1a53e4209702ebddf3b19d4107659e6 100644 (file)
@@ -182,6 +182,9 @@ void debugCommand(redisClient *c) {
             addReplyError(c, "DEBUG FLUSHCACHE called with diskstore off.");
             return;
         } else {
             addReplyError(c, "DEBUG FLUSHCACHE called with diskstore off.");
             return;
         } else {
+            /* To flush the whole cache we need to wait for everything to
+             * be flushed on disk... */
+            cacheForcePointInTime();
             emptyDb();
             addReply(c,shared.ok);
             return;
             emptyDb();
             addReply(c,shared.ok);
             return;