Implement hybrid mode for Store Gateway#7689
Draft
SungJin1212 wants to merge 1 commit into
Draft
Conversation
SungJin1212
marked this pull request as draft
July 14, 2026 07:34
SungJin1212
force-pushed
the
hybrid-SG
branch
4 times, most recently
from
July 21, 2026 02:44
ce7c27f to
ccb6de4
Compare
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Problem Statement
In the current Parquet mode, the store only serves blocks that have already been converted to Parquet. Any block that hasn't been converted yet is not queryable at all, since the Parquet store has no way to read TSDB blocks.
In practice, this forces operators to either stay on tsdb mode or wait for full conversion of all historical blocks before flipping the switch. Even then, the gap doesn't fully go away: new blocks are produced continuously (from Compactor) and take some time to be converted.
Solutions
This PR introduces a hybrid mode: store-gateway now runs both a Parquet store and a TSDB store, and routes requests per-block between them, eliminating the query gap described above.
The core idea is to use the bucket index to sync only the blocks that are still TSDB, minimizing what the TSDB sub-store has to sync, while blocks already converted to Parquet are served by the Parquet bucket store.
Note
The existing Parquet bucket store can only serve Parquet-converted blocks. Because conversion always lags behind block upload, there is always a set of not-yet-converted (TSDB) blocks in object storage. A store-gateway running in Parquet-only mode cannot serve those blocks, which leaves a query gap for recent or not-yet-converted blocks.
To close this gap, I extended the Parquet mode to also sync only the non-Parquet blocks through a TSDB sub-store, so every block is served by either the Parquet or the TSDB store.
As a side effect, the Parquet bucket store no longer relies solely on the bucket index, so its behavior changes from stateless to semi-stateful.
Which issue(s) this PR fixes:
Fixes #7140
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]docs/configuration/v1-guarantees.mdupdated if this PR introduces experimental flags