Repository navigation
Check every source for timeouts when announce_timeout is set - #85
Open
stewartadam wants to merge 2 commits into
Open
stewartadam wants to merge 2 commits into
stewartadam wants to merge 2 commits into
Conversation
In the announce_timeout branch of check_timeouts, the outer loop broke when the first source had no timed out universe, because the condition was inverted. Only the first source in the HashMap was ever checked, so UniverseTimeout (E1.31 network data loss) was missed for every other source and their stale sequence numbers were never removed. Break once a timed out universe has been found instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzaQVQThQpmqhvLapk99Vs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KzaQVQThQpmqhvLapk99Vs
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
In the
announce_timeoutbranch ofcheck_timeoutsinsrc/receive.rs, the outer loop over sources was:The condition was inverted. The loop stopped after the first source in the
HashMapwhenever that source had no timed-out universe. Only one, effectively random, source was ever checked. For every other source,UniverseTimeout(E1.31-2016 §6.7.1 network data loss) was never reported and their stale sequence numbers were never removed.The condition is now
is_some(), so the loop stops once a timed-out universe has been found. The non-announce branch already checked every source.Tests
test_check_timeouts_announce_finds_any_source: 16 live sources and 1 timed-out source. The timed-out one is reported and removed, and nothing else times out. It fails every run with the old condition and passes with the fix.cargo testandcargo clippypass, and clippy reports no new warnings.