-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement snapshotting at shutdown #363
Conversation
…the map as a network channel
…ng within the loop and to trigger a snapshot once all the network connections are closed
…he global terminate variable in a worker and program one
…at_shutdown instead of duplicating the code
…mentation after the refactoring
…shot as being generated for the tests
…shot has been attempted
… if snapshots are in progress unreliable and flaky
…utdown, use an internal setting stored in db config snapshot
… has been requested
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #363 +/- ##
==========================================
+ Coverage 78.97% 79.09% +0.13%
==========================================
Files 182 182
Lines 12546 12609 +63
==========================================
+ Hits 9907 9973 +66
+ Misses 2639 2636 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 9 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
uint8_t listeners_count) { | ||
// TODO: should use a struct with fp pointers, not ifs | ||
if (worker_context->config->network->backend == CONFIG_NETWORK_BACKEND_IO_URING) { | ||
worker_network_iouring_cleanup(listeners, listeners_count); |
Check warning
Code scanning / CodeQL
Expression has no effect
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