diff options
author | chenyang8094 <chenyang8094@users.noreply.github.com> | 2022-06-02 14:00:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-02 09:00:12 +0300 |
commit | aae0ec255327e431221f3946b953321246fc8a3b (patch) | |
tree | 35ccc4be6adfa849fc9b189e7e6915db9369b98c | |
parent | cf3323dba473f3849200d294bb0349cd442f2006 (diff) | |
download | redis-aae0ec255327e431221f3946b953321246fc8a3b.tar.gz |
Only print final log when aof is loaded successfully (#10808)
Skip the print on AOF_NOT_EXIST status.
-rw-r--r-- | src/server.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 */ |