提交 c66bf1fa 编写于 作者: A antirez

correctly set AOF base size field in server structure

上级 d630abcd
...@@ -304,6 +304,7 @@ int loadAppendOnlyFile(char *filename) { ...@@ -304,6 +304,7 @@ int loadAppendOnlyFile(char *filename) {
server.appendonly = appendonly; server.appendonly = appendonly;
stopLoading(); stopLoading();
aofUpdateCurrentSize(); aofUpdateCurrentSize();
server.auto_aofrewrite_base_size = server.appendonly_current_size;
return REDIS_OK; return REDIS_OK;
readerr: readerr:
...@@ -689,6 +690,7 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) { ...@@ -689,6 +690,7 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
server.appendseldb = -1; /* Make sure it will issue SELECT */ server.appendseldb = -1; /* Make sure it will issue SELECT */
redisLog(REDIS_NOTICE,"The new append only file was selected for future appends."); redisLog(REDIS_NOTICE,"The new append only file was selected for future appends.");
aofUpdateCurrentSize(); aofUpdateCurrentSize();
server.auto_aofrewrite_base_size = server.appendonly_current_size;
} else { } else {
/* If append only is disabled we just generate a dump in this /* If append only is disabled we just generate a dump in this
* format. Why not? */ * format. Why not? */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册