Repository navigation
fix(task): corroborate a refused connect by the peers it overlapped - #217
Draft
greenhat616 wants to merge 1 commit into
Draft
greenhat616 wants to merge 1 commit into
greenhat616 wants to merge 1 commit into
Conversation
A connect the server never answers fails only at the connect timeout. When the runners that delivered beside it had finished by then, no attempt was proven at its classification: the refusal was not corroborated, the limit was not lowered, and the growth doubled into the silent limit again (bench s5 Hang, design §14.17). The evidence now keeps, for each attempt still connecting, the most other attempts in flight at the moments that saw a proven attempt beside it: spawns, strategy ticks, failures, and the frame that first proves an attempt (even when that frame completes its chunk). A refusal with such a record is corroborated, at the larger of that level and the one of its classification, so the reconnects of its ranges at a lower level keep the streak. The lowering still needs progress a tick after the third refusal and some runners connected. The range budget's exemption (D27) still reads only the moment of the classification. A record is consumed at the attempt's classification or Started, and forgotten when the attempt ends without one (cancelled while connecting, beaten in its hedged pair) or its runner ID is reserved again. s5 Hang now completes in 60.0 s instead of 85.0 s, with four connections turned away instead of eight; s5 Close is unchanged. Design notes in §8.3 and §14.12a (D32), numbers in §14.17.
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.
PR-6b of the concurrency window redesign (T32; design §8.3, §12, §14.12a, §14.17; decision D32). Stacked on #216, which is its base.
Why
Bench s5 Hang (#216): the server admits 4 connections and lets further connects hang until the connect timeout. The healthy peers finish before the hung connects time out, so at classification no attempt is proven: the refusals are uncorroborated, the silent-limit rule never lowers the limit, and the growth doubles into a second round of hung connects (85 s vs 53 s for the Close variant).
What
C42
fix(task): corroborate a refused connect by the peers it overlappedAdmissionEvidencekeeps, per attempt still connecting, the most other attempts in flight seen at a moment when some attempt was proven. At most one value per runner ID; no event log, no clock.Startedor at classification. It is forgotten when the attempt is cancelled while connecting, when the attempt is beaten in its hedged pair, or when its runner ID is reserved again.1 ≤ connected < limit;STREAK_GAP;Bench s5 (10 runs each, median / p90)
Only s5 was re-run. The other scenarios have no refused connects (§14.17, stated as inference).
Tests
Startedand re-reservation;download_loop/tests/admission.rs:Verification
-D warningspass.cargo test --workspace --all-features: 1061 passed, 0 failed, 1 ignored.cargo bench --no-runpasses.