Configurable block listing strategy #5828
Merged
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.
What this PR does:
Allowing configuring different strategies to fetch block IDs from object store, similar to thanos-io/thanos#7134.
Thanos changed its block listing strategy in thanos-io/thanos#6474 which iterates the whole bucket. This can be extremely slow in some object store implementation. For example, when bucket versioning is enabled in S3, it is very slow to iterate the whole bucket. This impacts Thanos as well as Cortex 1.16.0 release.
In thanos-io/thanos#7134, Thanos reverts its block listing strategy back to the original one to avoid iterating the whole bucket. Thus, exposing the same configuration in Cortex and make the default configuration
Concurrent
, which is the old working behavior.Additionally, put the bucket index based block IDs fetcher introduced in #5681 a block listing strategy as well and it is only used in Compactor. Before this change, this block IDs fetcher is always enabled when bucket index is turned on in compactor. This feature can have some downside of delayed compaction since bucket index might have delay. Putting it under a FF to allow users to choose whether to use this feature or not.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]