refactor(server): use papaya instead of DashMap for shards_table#2828
Closed
krishvishal wants to merge 2 commits intoapache:masterfrom
Closed
refactor(server): use papaya instead of DashMap for shards_table#2828krishvishal wants to merge 2 commits intoapache:masterfrom
krishvishal wants to merge 2 commits intoapache:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2828 +/- ##
============================================
+ Coverage 67.58% 67.59% +0.01%
Complexity 708 708
============================================
Files 1027 1027
Lines 83147 83150 +3
Branches 60004 60019 +15
============================================
+ Hits 56195 56208 +13
+ Misses 24612 24591 -21
- Partials 2340 2351 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
mmodzelewski
approved these changes
Feb 27, 2026
hubcio
approved these changes
Feb 27, 2026
hubcio
approved these changes
Feb 27, 2026
numinnex
reviewed
Feb 27, 2026
Contributor
Author
|
@numinnex understood. Closing this PR. |
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.
Which issue does this PR close?
Closes #2827
Rationale
shards_tablehas a read-heavy workload (queried on every message route, written only on partition create/delete/rebalance). papaya's lock-free design is purpose-built for this pattern.What changed?
DashMapwithpapaya::HashMapfor theshards_tableshared lookup table, which maps partition namespaces to owning shards.pin()returns aHashMapRefwith ergonomicget/insert/remove/itermethods. Only worry is that as long aspin()is not dropped the garbage collector ofpapayawon't clean memory. This maybe a cause for concern across async boundaries.