m3db / m3

M3 monorepo - Distributed TSDB, Aggregator and Query Engine, Prometheus Sidecar, Graphite Compatible, Metrics Platform
https://m3db.io/
Apache License 2.0
4.7k stars 451 forks source link

[dbnode] use index in shard for FetchBlocksMetadata pagination #4263

Open Antanukas opened 7 months ago

Antanukas commented 7 months ago

What this PR does / why we need it:

Fixes # racy fetchActiveBlocksMetadata pagination where due to race during cluster resize (peers bootstrapping) some series could have been skipped from the active block.

Special notes for your reviewer:

Previously Index field would be set outside the lock that might cause order in the list mismatch the Index causing some series to be missed when using cursor based pagination.

Does this PR introduce a user-facing and/or backwards incompatible change?:

NONE

Does this PR require updating code package or user-facing documentation?:

NONE