Skip to content
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

[1.0.4] Fast shutdown in irreversible mode #1061

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

heifner
Copy link
Member

@heifner heifner commented Dec 10, 2024

Faster shutdown in response to ctrl-c/SIGINT/SIGTERM/SIGPIPE especially when syncing in irreversible mode.

Resolves #1053

@heifner heifner requested review from linh2931 and greg7mdp December 10, 2024 20:47
@heifner heifner added the OCI Work exclusive to OCI team label Dec 10, 2024
@heifner heifner linked an issue Dec 10, 2024 that may be closed by this pull request
// In irreversible mode, break every ~500ms to allow other tasks (e.g. get_info, SHiP) opportunity to run. There is a post
// for every incoming blocks; enough posted tasks to apply all blocks queued to the fork db.
if (read_mode == db_read_mode::IRREVERSIBLE) {
if (!replaying && fc::time_point::now() - start > fc::milliseconds(500))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't start be reset?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once this returns false, the method exits.

@heifner heifner merged commit 790584e into release/1.0 Dec 11, 2024
36 checks passed
@heifner heifner deleted the GH-1053-irr-shutdown-1.0 branch December 11, 2024 18:42
@ericpassmore
Copy link
Contributor

Note:start
category: System Stability
component: Internal
summary: Fast shutdown in irreversible mode.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow shutdown in irreversible mode
4 participants