perf(share/discovery): Exponential backoff on peer loss - #5155
Draft
renaynay wants to merge 1 commit into
Draft
Conversation
Replaces the fixed 10m discovery backoff with an exponential one: 10s doubling to a 10m cap. A peer lost transiently is re-dialable in 10s instead of being locked out for 10 minutes, which keeps the discovered peer pool from shrinking during EDS sync. Two supporting changes are required for the escalation to be real: - GC retains a peer's cache entry for maxBackoff past its expiry. Deleting on expiry (as before) destroyed the BackoffStrategy holding the attempt counter, so growth never survived a 60s GC tick. - A successful dial resets the accumulated delay, so growth tracks failures only and does not penalize peers churned by ConnManager or closed by the remote side. NoJitter is used rather than FullJitter: the latter draws uniformly in [min, computed), so a peer at the 10m cap could be handed a 10s delay. Part of PROTOCO-2120. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/shrex-eds-optimisation #5155 +/- ##
=================================================================
Coverage ? 37.29%
=================================================================
Files ? 311
Lines ? 21597
Branches ? 0
=================================================================
Hits ? 8055
Misses ? 12531
Partials ? 1011 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Replaces the fixed 10m discovery backoff with an exponential one: 10s doubling to a 10m cap. A peer lost transiently is re-dialable in 10s instead of being locked out for 10 minutes, which keeps the discovered peer pool from shrinking during EDS sync.
Part of PROTOCO-2120