Commit 885c4f85 authored by zhaozhao.zz's avatar zhaozhao.zz
Browse files

PSYNC2 & RDB: fix the missing rdbSaveInfo for BGSAVE

parent 6ddf0ea2
...@@ -1999,6 +1999,9 @@ void bgsaveCommand(client *c) { ...@@ -1999,6 +1999,9 @@ void bgsaveCommand(client *c) {
} }
} }
rdbSaveInfo rsi, *rsiptr;
rsiptr = rdbPopulateSaveInfo(&rsi);
if (server.rdb_child_pid != -1) { if (server.rdb_child_pid != -1) {
addReplyError(c,"Background save already in progress"); addReplyError(c,"Background save already in progress");
} else if (server.aof_child_pid != -1) { } else if (server.aof_child_pid != -1) {
...@@ -2011,7 +2014,7 @@ void bgsaveCommand(client *c) { ...@@ -2011,7 +2014,7 @@ void bgsaveCommand(client *c) {
"Use BGSAVE SCHEDULE in order to schedule a BGSAVE whenever " "Use BGSAVE SCHEDULE in order to schedule a BGSAVE whenever "
"possible."); "possible.");
} }
} else if (rdbSaveBackground(server.rdb_filename,NULL) == C_OK) { } else if (rdbSaveBackground(server.rdb_filename,rsiptr) == C_OK) {
addReplyStatus(c,"Background saving started"); addReplyStatus(c,"Background saving started");
} else { } else {
addReply(c,shared.err); 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