diff --git a/src/aof.c b/src/aof.c index 9d4587781..5c64c06f9 100644 --- a/src/aof.c +++ b/src/aof.c @@ -813,10 +813,10 @@ int openNewIncrAofForAppend(void) { * AOFs has not reached the limit threshold. * */ #define AOF_REWRITE_LIMITE_THRESHOLD 3 -#define AOF_REWRITE_LIMITE_NAX_MINUTES 60 /* 1 hour */ +#define AOF_REWRITE_LIMITE_MAX_MINUTES 60 /* 1 hour */ int aofRewriteLimited(void) { int limit = 0; - static int limit_deley_minutes = 0; + static int limit_delay_minutes = 0; static time_t next_rewrite_time = 0; unsigned long incr_aof_num = listLength(server.aof_manifest->incr_aof_list); @@ -824,25 +824,25 @@ int aofRewriteLimited(void) { if (server.unixtime < next_rewrite_time) { limit = 1; } else { - if (limit_deley_minutes == 0) { + if (limit_delay_minutes == 0) { limit = 1; - limit_deley_minutes = 1; + limit_delay_minutes = 1; } else { - limit_deley_minutes *= 2; + limit_delay_minutes *= 2; } - if (limit_deley_minutes > AOF_REWRITE_LIMITE_NAX_MINUTES) { - limit_deley_minutes = AOF_REWRITE_LIMITE_NAX_MINUTES; + if (limit_delay_minutes > AOF_REWRITE_LIMITE_MAX_MINUTES) { + limit_delay_minutes = AOF_REWRITE_LIMITE_MAX_MINUTES; } - next_rewrite_time = server.unixtime + limit_deley_minutes * 60; + next_rewrite_time = server.unixtime + limit_delay_minutes * 60; serverLog(LL_WARNING, "Background AOF rewrite has repeatedly failed %ld times and triggered the limit, will retry in %d minutes", - incr_aof_num, limit_deley_minutes); + incr_aof_num, limit_delay_minutes); } } else { - limit_deley_minutes = 0; + limit_delay_minutes = 0; next_rewrite_time = 0; }