Closed danielealbano closed 1 year ago
Patch coverage: 82.83
% and project coverage change: +0.13
:tada:
Comparison is base (
8475737
) 78.97% compared to head (0fdc880
) 79.09%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This PR introduces the ability to trigger a snapshot when the workers start to shutdown.
To achieve this quite some changes have been done to the workers events loops: meanwhile before the initialization and shutdown of the internal database and the networking could have performed before entering the loop and at its end, with the need to be able to perform I/O the loop has still to run at the shutdown but it's necessary to terminate all the connections and pending operations. The PR introduces the required changes and therefore it's now possible perform operations both at the startup and at the shutdown, within the loop!
The PR also introduces a new field in the snapshot structure to keep track of the number of iteration performed, very handy to check if a snapshot has been taken, used now internally.
A number of additional fixes have been introduced, e.g. to better sync the shutdown of the signal handler thread or of the epoch gc workers., better tests for the SAVE and BGSAVE commands, improve tests for SHUTDOWN, etc.
Closes #316