Unverified Commit 992a610f authored by harleyliao's avatar harleyliao Committed by GitHub
Browse files

set aof rewrite status err, when fork fail (#5606)

when aof rewrite is failed by fork(), It'll be indicated by aof_last_bgrewrite_status
INFO field, same as when the fork child fails later on.
parent 985430b4
...@@ -1755,6 +1755,7 @@ int rewriteAppendOnlyFileBackground(void) { ...@@ -1755,6 +1755,7 @@ int rewriteAppendOnlyFileBackground(void) {
} else { } else {
/* Parent */ /* Parent */
if (childpid == -1) { if (childpid == -1) {
server.aof_lastbgrewrite_status = C_ERR;
serverLog(LL_WARNING, serverLog(LL_WARNING,
"Can't rewrite append only file in background: fork: %s", "Can't rewrite append only file in background: fork: %s",
strerror(errno)); strerror(errno));
......
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