Skip to content

Commit 310251d

Browse files
Support querying metrics with live-stores via header
1 parent 4eecf4d commit 310251d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/querier/querier.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,9 @@ func (q *Querier) forGivenGenerators(ctx context.Context, f forEachGeneratorFn)
485485
ctx, span := tracer.Start(ctx, "Querier.forGivenGenerators")
486486
defer span.End()
487487

488-
if q.queryPartitionRing {
488+
recentDataTarget := extractRecentDataTarget(ctx)
489+
490+
if q.queryPartitionRing || recentDataTarget == "live-store" {
489491
rs, err := q.partitionRing.GetReplicationSetsForOperation(ring.Read)
490492
if err != nil {
491493
return nil, fmt.Errorf("error finding partition ring replicas: %w", err)

0 commit comments

Comments
 (0)