提交 49b99ab4 编写于 作者: A antirez

Changed the reply of BGSAVE and BGREWRITEAOF from +OK to a more meaningful...

Changed the reply of BGSAVE and BGREWRITEAOF from +OK to a more meaningful message that makes the user aware of an operation that just started and is not yet finished.
上级 179b3952
...@@ -3295,7 +3295,8 @@ static void bgsaveCommand(redisClient *c) { ...@@ -3295,7 +3295,8 @@ static void bgsaveCommand(redisClient *c) {
return; return;
} }
if (rdbSaveBackground(server.dbfilename) == REDIS_OK) { if (rdbSaveBackground(server.dbfilename) == REDIS_OK) {
addReply(c,shared.ok); char *status = "+Background saving started\r\n";
addReplySds(c,sdsnew(status));
} else { } else {
addReply(c,shared.err); addReply(c,shared.err);
} }
...@@ -6082,7 +6083,8 @@ static void bgrewriteaofCommand(redisClient *c) { ...@@ -6082,7 +6083,8 @@ static void bgrewriteaofCommand(redisClient *c) {
return; return;
} }
if (rewriteAppendOnlyFileBackground() == REDIS_OK) { if (rewriteAppendOnlyFileBackground() == REDIS_OK) {
addReply(c,shared.ok); char *status = "+Background append only file rewriting started\r\n";
addReplySds(c,sdsnew(status));
} else { } else {
addReply(c,shared.err); addReply(c,shared.err);
} }
......
...@@ -130,6 +130,9 @@ databases 16 ...@@ -130,6 +130,9 @@ databases 16
# log file at startup ignoring the dump.rdb file. # log file at startup ignoring the dump.rdb file.
# #
# The name of the append only file is "appendonly.log" # The name of the append only file is "appendonly.log"
#
# IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append
# log file in background when it gets too big.
appendonly no appendonly no
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册