Skip to content

Commit

Permalink
Delete the residual code related to aof rewrite buf (#10176)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyang8094 authored Jan 25, 2022
1 parent 823da54 commit ac011eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions src/aof.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ac011eb

Please sign in to comment.