From ac011ebd7f86431874a7537d94926b1aff937f2f Mon Sep 17 00:00:00 2001 From: chenyang8094 Date: Tue, 25 Jan 2022 17:37:18 +0800 Subject: [PATCH] Delete the residual code related to aof rewrite buf (#10176) --- src/aof.c | 4 +--- src/server.h | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/aof.c b/src/aof.c index 80b9512005..90c7fe122a 100644 --- a/src/aof.c +++ b/src/aof.c @@ -2328,9 +2328,7 @@ int rewriteAppendOnlyFileBackground(void) { } /* We set aof_selected_db to -1 in order to force the next call to the - * feedAppendOnlyFile() to issue a SELECT command, so the differences - * accumulated by the parent into server.aof_rewrite_buf will start - * with a SELECT statement and it will be safe to merge. */ + * feedAppendOnlyFile() to issue a SELECT command. */ server.aof_selected_db = -1; flushAppendOnlyFile(1); if (openNewIncrAofForAppend() != C_OK) return C_ERR; diff --git a/src/server.h b/src/server.h index 07315ddcd0..f376f620f1 100644 --- a/src/server.h +++ b/src/server.h @@ -1616,7 +1616,6 @@ struct redisServer { off_t aof_fsync_offset; /* AOF offset which is already synced to disk. */ int aof_flush_sleep; /* Micros to sleep before flush. (used by tests) */ int aof_rewrite_scheduled; /* Rewrite once BGSAVE terminates. */ - list *aof_rewrite_buf_blocks; /* Hold changes during an AOF rewrite. */ sds aof_buf; /* AOF buffer, written before entering the event loop */ int aof_fd; /* File descriptor of currently selected AOF file */ int aof_selected_db; /* Currently selected DB in AOF */