More reliable DEBUG loadaof.

Make sure to flush the AOF output buffers before reloading.
Result: less false timing related false positives on AOF tests.
This commit is contained in:
antirez 2015-10-30 11:57:36 +01:00
parent 073a42b997
commit f26072eb66

View File

@ -293,6 +293,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(-1,EMPTYDB_NO_FLAGS,NULL);
if (loadAppendOnlyFile(server.aof_filename) != C_OK) {
addReply(c,shared.err);