From aae0ec255327e431221f3946b953321246fc8a3b Mon Sep 17 00:00:00 2001 From: chenyang8094 Date: Thu, 2 Jun 2022 14:00:12 +0800 Subject: [PATCH] Only print final log when aof is loaded successfully (#10808) Skip the print on AOF_NOT_EXIST status. --- src/server.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index a5454eded..f41cd6c26 100644 --- a/src/server.c +++ b/src/server.c @@ -6475,7 +6475,8 @@ void loadDataFromDisk(void) { int ret = loadAppendOnlyFiles(server.aof_manifest); if (ret == AOF_FAILED || ret == AOF_OPEN_ERR) exit(1); - serverLog(LL_NOTICE, "DB loaded from append only file: %.3f seconds", (float)(ustime()-start)/1000000); + if (ret != AOF_NOT_EXIST) + serverLog(LL_NOTICE, "DB loaded from append only file: %.3f seconds", (float)(ustime()-start)/1000000); } else { rdbSaveInfo rsi = RDB_SAVE_INFO_INIT; errno = 0; /* Prevent a stale value from affecting error checking */