Skip to content

Allow store gateway to ignore syncing blocks older than certain time#6830

Merged
yeya24 merged 6 commits into
cortexproject:masterfrom
yeya24:store-gateway-min-time
Jun 20, 2025
Merged

Allow store gateway to ignore syncing blocks older than certain time#6830
yeya24 merged 6 commits into
cortexproject:masterfrom
yeya24:store-gateway-min-time

Conversation

@yeya24

@yeya24 yeya24 commented Jun 19, 2025

Copy link
Copy Markdown
Contributor

What this PR does:

Add ignore_blocks_before config so that Store Gateway won't sync blocks that are too old. This can be useful for tiered Store Gateway deployment. Another use case is when migrating to Parquet based storage, Store Gateway can be gradually scale down so we can use this config to load less blocks.

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]

Signed-off-by: yeya24 <[email protected]>
@yeya24
yeya24 force-pushed the store-gateway-min-time branch from 1e029f7 to b4763c1 Compare June 19, 2025 07:53
Comment thread pkg/storegateway/bucket_stores.go Outdated
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Jun 19, 2025
Signed-off-by: yeya24 <[email protected]>
@pull-request-size pull-request-size Bot added size/S and removed size/M labels Jun 19, 2025
Signed-off-by: yeya24 <[email protected]>
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Jun 19, 2025
@SungJin1212

Copy link
Copy Markdown
Member

LGTM!

Signed-off-by: yeya24 <[email protected]>
@pull-request-size pull-request-size Bot added size/L and removed size/M labels Jun 20, 2025
@yeya24
yeya24 merged commit 6dbc78c into cortexproject:master Jun 20, 2025
31 of 32 checks passed
@yeya24
yeya24 deleted the store-gateway-min-time branch June 20, 2025 17:16
bogdan-st pushed a commit to bogdan-st/cortex that referenced this pull request Jun 30, 2025
…ortexproject#6830)

* allow store gateway to ignore syncing blocks older than certain time

Signed-off-by: Ben Ye <[email protected]>

* changelog

Signed-off-by: yeya24 <[email protected]>

* fix handling default value 0

Signed-off-by: yeya24 <[email protected]>

* fix

Signed-off-by: yeya24 <[email protected]>

* refactor code a bit

Signed-off-by: yeya24 <[email protected]>

* update unit test

Signed-off-by: yeya24 <[email protected]>

---------

Signed-off-by: Ben Ye <[email protected]>
Signed-off-by: yeya24 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants