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.
This commit is contained in:
harleyliao 2021-11-16 19:59:03 +08:00 committed by GitHub
parent 985430b4fc
commit 992a610fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1755,6 +1755,7 @@ int rewriteAppendOnlyFileBackground(void) {
} else {
/* Parent */
if (childpid == -1) {
server.aof_lastbgrewrite_status = C_ERR;
serverLog(LL_WARNING,
"Can't rewrite append only file in background: fork: %s",
strerror(errno));