Skip to content

Commit 93a9df3

Browse files
committed
fix reviews
Signed-off-by: Ray Cao <zisong.cw@alibaba-inc.com>
1 parent 2ab4969 commit 93a9df3

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/aof.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ int startAppendOnly(void) {
10071007

10081008
/* try to Restart AOF after a successful primary-replica full SYNC with
10091009
* existing RDB file. */
1010-
int tryRestartAOFAfterSYNCWithRdb(void) {
1010+
int RestartAOFWithSyncFile(void) {
10111011
serverAssert(server.aof_state == AOF_OFF);
10121012

10131013
int newfd = -1, rdbfile_renamed = 0;
@@ -1112,9 +1112,7 @@ int tryRestartAOFAfterSYNCWithRdb(void) {
11121112
}
11131113
}
11141114
if (temp_am) aofManifestFree(temp_am);
1115-
if (new_base_filename) sdsfree(new_base_filename);
11161115
if (new_base_filepath) sdsfree(new_base_filepath);
1117-
if (new_incr_filename) sdsfree(new_incr_filename);
11181116
if (new_incr_filepath) sdsfree(new_incr_filepath);
11191117
if (newfd != -1) close(newfd);
11201118
return C_ERR;

src/replication.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2524,7 +2524,7 @@ void readSyncBulkPayload(connection *conn) {
25242524
/* Restart the AOF subsystem now that we finished the sync. This
25252525
* will trigger an AOF rewrite, and when done will start appending
25262526
* to the new file. */
2527-
if (!use_diskless_load && server.aof_enabled && server.aof_use_rdb_preamble) tryRestartAOFAfterSYNCWithRdb();
2527+
if (!use_diskless_load && server.aof_enabled && server.aof_use_rdb_preamble) RestartAOFWithSyncFile();
25282528

25292529
if (server.aof_enabled && server.aof_state == AOF_OFF) restartAOFAfterSYNC();
25302530

src/server.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2984,7 +2984,7 @@ int rewriteAppendOnlyFileBackground(void);
29842984
int loadAppendOnlyFiles(aofManifest *am);
29852985
void stopAppendOnly(void);
29862986
int startAppendOnly(void);
2987-
int tryRestartAOFAfterSYNCWithRdb(void);
2987+
int RestartAOFWithSyncFile(void);
29882988
void backgroundRewriteDoneHandler(int exitcode, int bysignal);
29892989
void killAppendOnlyChild(void);
29902990
void restartAOFAfterSYNC(void);

0 commit comments

Comments
 (0)