mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Set aof rewrite status in some backgroundRewriteDoneHandler errors (#10923)
We should also set aof_lastbgrewrite_status to C_ERR on these errors. Because aof rewrite did fail, and we did not finish the manifest update. Also maintain the stat_aofrw_consecutive_failures.
This commit is contained in:
parent
0b645d6319
commit
679344a2b0
@ -2577,6 +2577,8 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
|
|||||||
strerror(errno));
|
strerror(errno));
|
||||||
aofManifestFree(temp_am);
|
aofManifestFree(temp_am);
|
||||||
sdsfree(new_base_filepath);
|
sdsfree(new_base_filepath);
|
||||||
|
server.aof_lastbgrewrite_status = C_ERR;
|
||||||
|
server.stat_aofrw_consecutive_failures++;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
latencyEndMonitor(latency);
|
latencyEndMonitor(latency);
|
||||||
@ -2605,6 +2607,8 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
|
|||||||
sdsfree(temp_incr_filepath);
|
sdsfree(temp_incr_filepath);
|
||||||
sdsfree(new_incr_filepath);
|
sdsfree(new_incr_filepath);
|
||||||
sdsfree(temp_incr_aof_name);
|
sdsfree(temp_incr_aof_name);
|
||||||
|
server.aof_lastbgrewrite_status = C_ERR;
|
||||||
|
server.stat_aofrw_consecutive_failures++;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
latencyEndMonitor(latency);
|
latencyEndMonitor(latency);
|
||||||
@ -2628,6 +2632,8 @@ void backgroundRewriteDoneHandler(int exitcode, int bysignal) {
|
|||||||
bg_unlink(new_incr_filepath);
|
bg_unlink(new_incr_filepath);
|
||||||
sdsfree(new_incr_filepath);
|
sdsfree(new_incr_filepath);
|
||||||
}
|
}
|
||||||
|
server.aof_lastbgrewrite_status = C_ERR;
|
||||||
|
server.stat_aofrw_consecutive_failures++;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
sdsfree(new_base_filepath);
|
sdsfree(new_base_filepath);
|
||||||
|
Loading…
Reference in New Issue
Block a user