Skip to content

Implement hybrid mode for Store Gateway#7689

Draft
SungJin1212 wants to merge 1 commit into
cortexproject:masterfrom
SungJin1212:hybrid-SG
Draft

Implement hybrid mode for Store Gateway#7689
SungJin1212 wants to merge 1 commit into
cortexproject:masterfrom
SungJin1212:hybrid-SG

Conversation

@SungJin1212

@SungJin1212 SungJin1212 commented Jul 14, 2026

Copy link
Copy Markdown
Member

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

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

@SungJin1212
SungJin1212 marked this pull request as draft July 14, 2026 07:34
@SungJin1212
SungJin1212 force-pushed the hybrid-SG branch 4 times, most recently from ce7c27f to ccb6de4 Compare July 21, 2026 02:44
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
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.

[Parquet] Store Gateway Hybrid Mode

1 participant