mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Fixed bug in AOF rewrite not working because of integer overflow
This commit is contained in:
parent
73b9e8aedf
commit
4f948300bc
@ -697,9 +697,9 @@ int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
|
||||
{
|
||||
int base = server.auto_aofrewrite_base_size ?
|
||||
server.auto_aofrewrite_base_size : 1;
|
||||
int growth = (server.appendonly_current_size*100/base);
|
||||
long long growth = (server.appendonly_current_size*100/base);
|
||||
if (growth >= server.auto_aofrewrite_perc) {
|
||||
redisLog(REDIS_NOTICE,"Starting automatic rewriting of AOF on %d growth",growth);
|
||||
redisLog(REDIS_NOTICE,"Starting automatic rewriting of AOF on %lld growth",growth);
|
||||
rewriteAppendOnlyFileBackground();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user