From 4fe431c702143662d021bcf0ee218c8e0ee1b977 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 30 Oct 2015 11:57:36 +0100 Subject: [PATCH] More reliable DEBUG loadaof. Make sure to flush the AOF output buffers before reloading. Result: less false timing related false positives on AOF tests. --- src/debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/debug.c b/src/debug.c index db342028..d7da4909 100644 --- a/src/debug.c +++ b/src/debug.c @@ -295,6 +295,7 @@ void debugCommand(client *c) { serverLog(LL_WARNING,"DB reloaded by DEBUG RELOAD"); addReply(c,shared.ok); } else if (!strcasecmp(c->argv[1]->ptr,"loadaof")) { + if (server.aof_state == AOF_ON) flushAppendOnlyFile(1); emptyDb(NULL); if (loadAppendOnlyFile(server.aof_filename) != C_OK) { addReply(c,shared.err);