diff options
author | judeng <abc3844@126.com> | 2022-04-04 13:38:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-04 08:38:41 +0300 |
commit | 6cdaa277036819440c013547a4a5c378efdb59ce (patch) | |
tree | 8319be5a61aff8f6971bcd4e43325a721766cdfc /src/aof.c | |
parent | 37beb5e67ed738065f2af7b6e3071c20b066caab (diff) | |
download | redis-6cdaa277036819440c013547a4a5c378efdb59ce.tar.gz |
fix typos in aof.c (#10513)
function aofRewriteLimited in aof.c, deley->delay and NAX->MAX
Co-authored-by: judeng <judeng@didiglobal.com>
Diffstat (limited to 'src/aof.c')
-rw-r--r-- | src/aof.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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; } |