Only print final log when aof is loaded successfully (#10808)

Skip the print on AOF_NOT_EXIST status.
This commit is contained in:
chenyang8094 2022-06-02 14:00:12 +08:00 committed by GitHub
parent cf3323dba4
commit aae0ec2553
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 */