thanos-io/thanos · error

unsupported retrieval strategy

Error message

unsupported retrieval strategy %s

What it means

A guard panic in newAsyncRespSet: the requested retrieval strategy constant is neither LazyRetrieval nor EagerRetrieval. This can only happen from programmer error or an incompatible binary mixing enum values, never from user input or store data.

Solutions

  1. Ensure the retrieval strategy passed to newAsyncRespSet comes from the defined RetrievalStrategy constants
  2. Rebuild/align all Thanos components to the same version if enums were changed
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/store/proxy_merge.go:652 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of thanos-io/thanos@35b8b99117 (2026-09-07). Data as JSON: /api/errors/49bf58c897a95083. Report an issue: GitHub.

Appendix: source

Thrown at pkg/store/proxy_merge.go:652

			emptyStreamResponses,
			lazyRetrievalMaxBufferedResponses,
			reportStatsFn,
		), nil
	case EagerRetrieval:
		return newEagerRespSet(
			frameTimeout,
			st.String(),
			st.LabelSets(),
			cancel,
			cl,
			shardMatcher,
			applySharding,
			emptyStreamResponses,
			labelsToRemove,
			reportStatsFn,
		), nil
	default:
		panic(fmt.Sprintf("unsupported retrieval strategy %s", retrievalStrategy))
	}
}

// eagerRespSet is a SeriesSet that blocks until all data is retrieved from
// the StoreAPI.
// NOTE(bwplotka): It also resorts the series (and emits warning) if the client.SupportsWithoutReplicaLabels() is false.
type eagerRespSet struct {
	// Generic parameters.
	cl           storepb.Store_SeriesClient
	closeSeries  context.CancelFunc
	frameTimeout time.Duration

	shardMatcher *storepb.ShardMatcher
	removeLabels map[string]struct{}

	storeName      string
	storeLabels    map[string]struct{}
	storeLabelSets []labels.Labels

View on GitHub (pinned to 35b8b99117)