Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable block listing strategy #5828

Merged

Conversation

yeya24
Copy link
Contributor

@yeya24 yeya24 commented Mar 25, 2024

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

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@yeya24 yeya24 force-pushed the configurable-block-listing-strategy branch from ece0e41 to f8cafdd Compare March 25, 2024 09:09
Copy link
Member

@friedrichg friedrichg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks for the detailed explanation

@alanprot
Copy link
Member

LGTM!

yeya24 added 2 commits April 9, 2024 09:48
…m Recursive to Concurrent

Signed-off-by: Ben Ye <benye@amazon.com>
Signed-off-by: Ben Ye <benye@amazon.com>
@yeya24 yeya24 force-pushed the configurable-block-listing-strategy branch from f8cafdd to 88c4acf Compare April 9, 2024 16:49
@yeya24 yeya24 enabled auto-merge (squash) April 9, 2024 16:49
@yeya24
Copy link
Contributor Author

yeya24 commented Apr 9, 2024

Just resolved the changelog conflict.
Merge on green since it got approved before.

@yeya24 yeya24 merged commit d6f922d into cortexproject:master Apr 9, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants