}
/* Trigger an AOF rewrite if needed */
- if (server.auto_aofrewrite_perc &&
+ if (server.bgsavechildpid == -1 &&
+ server.bgrewritechildpid == -1 &&
+ server.auto_aofrewrite_perc &&
server.appendonly_current_size > server.auto_aofrewrite_min_size)
{
int base = server.auto_aofrewrite_base_size ?
server.auto_aofrewrite_base_size : 1;
long long growth = (server.appendonly_current_size*100/base);
if (growth >= server.auto_aofrewrite_perc) {
- redisLog(REDIS_NOTICE,"Starting automatic rewriting of AOF on %lld growth",growth);
+ redisLog(REDIS_NOTICE,"Starting automatic rewriting of AOF on %lld%% growth",growth);
rewriteAppendOnlyFileBackground();
}
}