Skip to content

engine: deduplicate ListWithCursor results across shards#3862

Open
End-rey wants to merge 1 commit intomasterfrom
improve-object-listing-for-policer
Open

engine: deduplicate ListWithCursor results across shards#3862
End-rey wants to merge 1 commit intomasterfrom
improve-object-listing-for-policer

Conversation

@End-rey
Copy link
Contributor

@End-rey End-rey commented Mar 4, 2026

Closes #3766.

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
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 25.79%. Comparing base (321c032) to head (225e484).
⚠️ Report is 8 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve engine-level object listing for policer

1 participant