From 3621223fbba8d9b5e9e5ce6348c96513e0186be2 Mon Sep 17 00:00:00 2001 From: chendianqiang Date: Tue, 12 Mar 2019 20:46:40 +0800 Subject: [PATCH] remove temp-rewriteaof-xxx.aof when interrupt aofrewrite --- src/aof.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/aof.c b/src/aof.c index 46ae58324..cafcf961c 100644 --- a/src/aof.c +++ b/src/aof.c @@ -1611,6 +1611,9 @@ void aofRemoveTempFile(pid_t childpid) { snprintf(tmpfile,256,"temp-rewriteaof-bg-%d.aof", (int) childpid); unlink(tmpfile); + + snprintf(tmpfile,256,"temp-rewriteaof-%d.aof", (int) childpid); + unlink(tmpfile); } /* Update the server.aof_current_size field explicitly using stat(2)