Repository navigation
fix: coordinate replication shutdown - #211
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Allow a verifier stopped during reconnect to release its execution barrier at the established durable cursor. The pacemaker can then finish storage shutdown and persist the current AccountsDB checksum. Shutdown that starts while connected still drains to the next replicated block, including across a reconnect.
Track server connection workers in the dispatcher, reap completed workers during normal operation, and join the remaining workers before reporting termination. Blocking transfers stay off the async runtime and use the existing socket timeouts.
Closes #209
Closes #210
Impact
Avoids reconnect backoff blocking verifier shutdown and forcing snapshot recovery on promotion. Successful dispatcher shutdown now waits for its connection workers to release their resources. No wire or storage format changes.
Reviewer notes
The dispatcher assumes a healthy listener; accept errors and worker failures are logged and isolated. Socket timeouts bound individual I/O operations, not an entire snapshot transfer; the existing shutdown-tier timeout remains unchanged.
The client fix was exercised remotely before the final control-flow refactor: 40 writes replicated, offline verifier shutdown completed successfully in 152 ms, promotion validated AccountsDB without recovery, and all transaction responses and eight account images matched. The server change has only been exercised locally; dedicated stalled-receiver and worker-panic scenarios remain unverified.