-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prunes repair QUIC connections #33775
prunes repair QUIC connections #33775
Conversation
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 |
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
.
1faed56
to
150934d
Compare
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.
150934d
to
8f57832
Compare
@lijunwangs I needed to make a minor change. can you please re-approve? |
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
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)
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>
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.