提交 0b17517c 编写于 作者: H Hampus Wessman

Fix automatic rewrite starting too early.

Slight adjustment in growth calculation.
上级 9e40bce3
......@@ -699,7 +699,7 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
{
int base = server.auto_aofrewrite_base_size ?
server.auto_aofrewrite_base_size : 1;
long long growth = (server.appendonly_current_size*100/base);
long long growth = (server.appendonly_current_size*100/base) - 100;
if (growth >= server.auto_aofrewrite_perc) {
redisLog(REDIS_NOTICE,"Starting automatic rewriting of AOF on %lld%% growth",growth);
rewriteAppendOnlyFileBackground();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册