This repository has been archived by the owner on Jan 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
prunes repair QUIC connections #33775
Merged
behzadnouri
merged 1 commit into
solana-labs:master
from
behzadnouri:repair-quic-cache-eviction
Oct 20, 2023
Merged
prunes repair QUIC connections #33775
behzadnouri
merged 1 commit into
solana-labs:master
from
behzadnouri:repair-quic-cache-eviction
Oct 20, 2023
Conversation
This file contains 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
Codecov Report
@@ Coverage Diff @@
## master #33775 +/- ##
=======================================
Coverage 81.8% 81.8%
=======================================
Files 807 807
Lines 218018 218104 +86
=======================================
+ Hits 178367 178449 +82
- Misses 39651 39655 +4 |
lijunwangs
reviewed
Oct 19, 2023
core/src/repair/quic_endpoint.rs
Outdated
for (_, (_, connection)) in &connections[CONNECTION_CACHE_CAPACITY..] { | ||
connection.close( | ||
CONNECTION_CLOSE_ERROR_CODE_DROPPED, | ||
CONNECTION_CLOSE_REASON_DROPPED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have better code and reason for example "too many"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to ..._PRUNED
.
behzadnouri
force-pushed
the
repair-quic-cache-eviction
branch
from
October 19, 2023 21:46
1faed56
to
150934d
Compare
lijunwangs
previously approved these changes
Oct 19, 2023
The commit implements lazy eviction for repair QUIC connections. The cache is allowed to grow to 2 x capacity at which point at least half of the entries with lowest stake are evicted, resulting in an amortized O(1) performance.
behzadnouri
force-pushed
the
repair-quic-cache-eviction
branch
from
October 19, 2023 21:59
150934d
to
8f57832
Compare
@lijunwangs I needed to make a minor change. can you please re-approve? |
lijunwangs
approved these changes
Oct 20, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
mergify bot
pushed a commit
that referenced
this pull request
Oct 20, 2023
The commit implements lazy eviction for repair QUIC connections. The cache is allowed to grow to 2 x capacity at which point at least half of the entries with lowest stake are evicted, resulting in an amortized O(1) performance. (cherry picked from commit dc3c827)
mergify bot
added a commit
that referenced
this pull request
Oct 20, 2023
prunes repair QUIC connections (#33775) The commit implements lazy eviction for repair QUIC connections. The cache is allowed to grow to 2 x capacity at which point at least half of the entries with lowest stake are evicted, resulting in an amortized O(1) performance. (cherry picked from commit dc3c827) Co-authored-by: behzad nouri <behzadnouri@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
The number of outstanding connections can grow boundlessly.
Summary of Changes
The commit implements lazy eviction for repair QUIC connections. The cache is allowed to grow to 2 x capacity at which point at least half of the entries with lowest stake are evicted, resulting in an amortized O(1) performance.