Merge pull request #5920 from chendq8/aofrewrite

remove temp-rewriteaof-xxx.aof when interrupt aofrewrite
This commit is contained in:
Salvatore Sanfilippo 2019-03-12 17:03:02 +01:00 committed by GitHub
commit f63bbb4335
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1611,6 +1611,9 @@ void aofRemoveTempFile(pid_t childpid) {
snprintf(tmpfile,256,"temp-rewriteaof-bg-%d.aof", (int) childpid); snprintf(tmpfile,256,"temp-rewriteaof-bg-%d.aof", (int) childpid);
unlink(tmpfile); unlink(tmpfile);
snprintf(tmpfile,256,"temp-rewriteaof-%d.aof", (int) childpid);
unlink(tmpfile);
} }
/* Update the server.aof_current_size field explicitly using stat(2) /* Update the server.aof_current_size field explicitly using stat(2)