We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7442437 commit a5c46d9Copy full SHA for a5c46d9
src/redis.c
@@ -2934,11 +2934,13 @@ int checkForSentinelMode(int argc, char **argv) {
2934
// 从 RDB 文件或 AOF 文件中载入数据到内存
2935
void loadDataFromDisk(void) {
2936
long long start = ustime();
2937
- // AOF 开启,并且有 AOF 文件时,优先使用 AOF 来还原
+
2938
+ // 如果开启了 AOF 功能,那么优先使用 AOF 文件来还原数据
2939
if (server.aof_state == REDIS_AOF_ON) {
2940
if (loadAppendOnlyFile(server.aof_filename) == REDIS_OK)
2941
redisLog(REDIS_NOTICE,"DB loaded from append only file: %.3f seconds",(float)(ustime()-start)/1000000);
2942
} else {
2943
+ // 在没有开启 AOF 功能时,才使用 RDB 来还原
2944
if (rdbLoad(server.rdb_filename) == REDIS_OK) {
2945
redisLog(REDIS_NOTICE,"DB loaded from disk: %.3f seconds",
2946
(float)(ustime()-start)/1000000);
0 commit comments