Commit f26072eb authored by antirez's avatar antirez
Browse files

More reliable DEBUG loadaof.

Make sure to flush the AOF output buffers before reloading.
Result: less false timing related false positives on AOF tests.
parent 073a42b9
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment