Skip to content

Commit

Permalink
Correct series Select handling with upstream changes
Browse files Browse the repository at this point in the history
In prometheus 2.24 dep upgrade prometheus changed how it signaled to
queriers whether the request was for data or just the series.
So with that upgrade we started *always* fetching all the data
regardless of the query (in this case a series call would fetch all data
for those series in the time range requested). As with before we're
working around this by introspecting (cortex does the same --
cortexproject/cortex#3461).

Fixes #415
  • Loading branch information
jacksontj committed Apr 2, 2021
1 parent 04c359c commit f9cc509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/proxyquerier/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (h *ProxyQuerier) Select(_ bool, hints *storage.SelectHints, matchers ...*l
// data call (query/query_range) and a metadata call (series). For now
// the working workaround is to switch based on the hints.
// https://github.com/prometheus/prometheus/issues/4057
if hints == nil {
if hints == nil || hints.Func == "series" {
matcherString, err := promhttputil.MatcherToString(matchers)
if err != nil {
return NewSeriesSet(nil, nil, err)
Expand Down

0 comments on commit f9cc509

Please sign in to comment.