fix: harden event sends on shutdown, debounce connection-triggered re-elections - #2231
Open
caesarniseko-coder wants to merge 1 commit into
Open
fix: harden event sends on shutdown, debounce connection-triggered re-elections#2231caesarniseko-coder wants to merge 1 commit into
caesarniseko-coder wants to merge 1 commit into
Conversation
…-elections - Tolerate closed event channels when emitting download progress and gathered info, so components exit cleanly during shutdown - Skip out-of-order indexed events instead of asserting, so replays after re-election don't crash the node - Recompute thunderbolt bridge cycles on network-interface and thunderbolt-connection updates - Debounce connection-triggered elections: absorb the topology-formation burst for 25s and coalesce it into at most one follow-up round, without delaying shutdown or dropping master-disconnect events Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
DownloadCoordinatorandWorker._forward_infonow tolerate closed/broken channels instead of crashing, so components exit cleanly during shutdownapply()skips out-of-order indexed events with a warning instead of asserting, so replayed events after a master re-election no longer crash the nodeTest plan
uv run pytest— full suite green (370 passed); election tests 14/14, suite runtime dropped from ~52s to ~2s since shutdown no longer stallsuv run basedpyright— 0 errorsuv run ruff check— clean🤖 Generated with Claude Code