From d8389a7e95160ddb3380e342e098f4faec3607c3 Mon Sep 17 00:00:00 2001 From: Thomas Jackson Date: Thu, 14 Jan 2021 21:30:42 -0800 Subject: [PATCH] Make remote read use the new selectParams for start/end Signed-off-by: Thomas Jackson Fixes: prometheus#4224 --- storage/remote/read.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage/remote/read.go b/storage/remote/read.go index 2ec48784dc..3ae5391fe8 100644 --- a/storage/remote/read.go +++ b/storage/remote/read.go @@ -160,7 +160,11 @@ func (q *querier) Select(ctx context.Context, sortSeries bool, hints *storage.Se } m, added := q.addExternalLabels(matchers) - query, err := ToQuery(q.mint, q.maxt, m, hints) + start, end := q.mint, q.maxt + if hints != nil { + start, end = hints.Start, hints.End + } + query, err := ToQuery(start, end, m, hints) if err != nil { return storage.ErrSeriesSet(fmt.Errorf("toQuery: %w", err)) }