Skip to content

Commit 2c6d15d

Browse files
rebased
Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com>
1 parent 85d2c18 commit 2c6d15d

File tree

3 files changed

+16
-771
lines changed

3 files changed

+16
-771
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ We use *breaking* word for marking changes that are not backward compatible (rel
2222
- [#2895](https://github.com/thanos-io/thanos/pull/2895) Compact: Fix increment of `thanos_compact_downsample_total` metric for downsample of 5m resolution blocks.
2323
- [#2858](https://github.com/thanos-io/thanos/pull/2858) Store: Fix `--store.grpc.series-sample-limit` implementation. The limit is now applied to the sum of all samples fetched across all queried blocks via a single Series call, instead of applying it individually to each block.
2424
- [#2936](https://github.com/thanos-io/thanos/pull/2936) Compact: Fix ReplicaLabelRemover panic when replicaLabels are not specified.
25-
- [#3010](https://github.com/thanos-io/thanos/pull/3010) Querier: Data gaps when switching iterators.
2625
- [#2956](https://github.com/thanos-io/thanos/pull/2956) Store: Fix fetching of chunks bigger than 16000 bytes.
2726
- [#2970](https://github.com/thanos-io/thanos/pull/2970) Store: Upgrade minio-go/v7 to fix slowness when running on EKS.
2827
- [#2976](https://github.com/thanos-io/thanos/pull/2976) Query: Better rounding for incoming query timestamps.

pkg/api/query/v1.go

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,15 @@ func (qapi *QueryAPI) series(r *http.Request) (interface{}, []error, *api.ApiErr
486486
return nil, nil, &api.ApiError{Typ: api.ErrorBadData, Err: err}
487487
}
488488

489+
var step time.Duration
490+
if t := r.FormValue("step"); t != "" {
491+
var err error
492+
step, err = parseDuration(t)
493+
if err != nil {
494+
return nil, nil, &api.ApiError{Typ: api.ErrorBadData, Err: err}
495+
}
496+
}
497+
489498
var matcherSets [][]*labels.Matcher
490499
for _, s := range r.Form["match[]"] {
491500
matchers, err := parser.ParseMetricSelector(s)
@@ -526,8 +535,14 @@ func (qapi *QueryAPI) series(r *http.Request) (interface{}, []error, *api.ApiErr
526535
metrics = []labels.Labels{}
527536
sets []storage.SeriesSet
528537
)
538+
539+
hints := &storage.SelectHints{
540+
Start: timestamp.FromTime(start),
541+
End: timestamp.FromTime(end),
542+
Step: int64(step),
543+
}
529544
for _, mset := range matcherSets {
530-
sets = append(sets, q.Select(false, nil, mset...))
545+
sets = append(sets, q.Select(false, hints, mset...))
531546
}
532547

533548
set := storage.NewMergeSeriesSet(sets, storage.ChainedSeriesMerge)

0 commit comments

Comments
 (0)