engine: deduplicate ListWithCursor results across shards#3862
Open
engine: deduplicate ListWithCursor results across shards#3862
ListWithCursor results across shards#3862Conversation
Previously `ListWithCursor` iterated shards one by one and stopped as soon as the requested count was reached, causing broadcast objects (lock, tombstone, link) stored on every shard to appear multiple times in the result. Now every call queries all shards simultaneously, deduplicates the combined output by object address, and returns each object exactly once. `AddressWithAttributes` gains a `ShardIDs` field populated with the IDs of all local shards that hold the object, providing per-shard placement data for future optimizations. The engine-level `Cursor` now tracks a separate shard-level cursor for each shard. Closes #3766. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3862 +/- ##
==========================================
- Coverage 25.85% 25.79% -0.06%
==========================================
Files 669 670 +1
Lines 43058 43115 +57
==========================================
- Hits 11132 11121 -11
- Misses 30912 30978 +66
- Partials 1014 1016 +2 ☔ View full report in Codecov by Sentry. 🚀 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.
Closes #3766.