Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita5c46d9

Browse files
committed
更新 redis.c 中关于持久化的部分
1 parent7442437 commita5c46d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/redis.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2934,11 +2934,13 @@ int checkForSentinelMode(int argc, char **argv) {
29342934
// 从 RDB 文件或 AOF 文件中载入数据到内存
29352935
voidloadDataFromDisk(void) {
29362936
long longstart=ustime();
2937-
// AOF 开启,并且有 AOF 文件时,优先使用 AOF 来还原
2937+
2938+
// 如果开启了 AOF 功能,那么优先使用 AOF 文件来还原数据
29382939
if (server.aof_state==REDIS_AOF_ON) {
29392940
if (loadAppendOnlyFile(server.aof_filename)==REDIS_OK)
29402941
redisLog(REDIS_NOTICE,"DB loaded from append only file: %.3f seconds",(float)(ustime()-start)/1000000);
29412942
}else {
2943+
// 在没有开启 AOF 功能时,才使用 RDB 来还原
29422944
if (rdbLoad(server.rdb_filename)==REDIS_OK) {
29432945
redisLog(REDIS_NOTICE,"DB loaded from disk: %.3f seconds",
29442946
(float)(ustime()-start)/1000000);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp