mirror of
https://github.com/fluencelabs/redis
synced 2025-05-16 20:41:19 +00:00
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:
parent
fdc8e0bd33
commit
4fe431c702
@ -295,6 +295,7 @@ void debugCommand(client *c) {
|
|||||||
serverLog(LL_WARNING,"DB reloaded by DEBUG RELOAD");
|
serverLog(LL_WARNING,"DB reloaded by DEBUG RELOAD");
|
||||||
addReply(c,shared.ok);
|
addReply(c,shared.ok);
|
||||||
} else if (!strcasecmp(c->argv[1]->ptr,"loadaof")) {
|
} else if (!strcasecmp(c->argv[1]->ptr,"loadaof")) {
|
||||||
|
if (server.aof_state == AOF_ON) flushAppendOnlyFile(1);
|
||||||
emptyDb(NULL);
|
emptyDb(NULL);
|
||||||
if (loadAppendOnlyFile(server.aof_filename) != C_OK) {
|
if (loadAppendOnlyFile(server.aof_filename) != C_OK) {
|
||||||
addReply(c,shared.err);
|
addReply(c,shared.err);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user