Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
- [#7326](https://github.com/thanos-io/thanos/pull/7326) Query: fixing exemplars proxy when querying stores with multiple tenants.
- [#7335](https://github.com/thanos-io/thanos/pull/7335) Dependency: Update minio-go to v7.0.70 which includes support for EKS Pod Identity.
- [#6948](https://github.com/thanos-io/thanos/pull/6948) Receive: fix goroutines leak during series requests to thanos store api.
- [#7392](https://github.com/thanos-io/thanos/pull/7392) Query: fix broken min, max for pre 0.34.1 sidecars

### Added

Expand Down
15 changes: 0 additions & 15 deletions pkg/query/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,20 +241,6 @@ func aggrsFromFunc(f string) []storepb.Aggr {
return []storepb.Aggr{storepb.Aggr_COUNT, storepb.Aggr_SUM}
}

func storeHintsFromPromHints(hints *storage.SelectHints) *storepb.QueryHints {
return &storepb.QueryHints{
StepMillis: hints.Step,
Func: &storepb.Func{
Name: hints.Func,
},
Grouping: &storepb.Grouping{
By: hints.By,
Labels: hints.Grouping,
},
Range: &storepb.Range{Millis: hints.Range},
}
}

func (q *querier) Select(ctx context.Context, _ bool, hints *storage.SelectHints, ms ...*labels.Matcher) storage.SeriesSet {
if hints == nil {
hints = &storage.SelectHints{
Expand Down Expand Up @@ -351,7 +337,6 @@ func (q *querier) selectFn(ctx context.Context, hints *storage.SelectHints, ms .
ShardInfo: q.shardInfo,
PartialResponseStrategy: q.partialResponseStrategy,
SkipChunks: q.skipChunks,
QueryHints: storeHintsFromPromHints(hints),
}
if q.isDedupEnabled() {
// Soft ask to sort without replica labels and push them at the end of labelset.
Expand Down
14 changes: 1 addition & 13 deletions pkg/store/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,19 +163,7 @@ func (p *PrometheusStore) Series(r *storepb.SeriesRequest, seriesSrv storepb.Sto
// Don't ask for more than available time. This includes potential `minTime` flag limit.
availableMinTime, _ := p.timestamps()
if r.MinTime < availableMinTime {
// Align min time with the step to avoid missing data when it gets retrieved by the upper layer's PromQL engine.
// This also is necessary when Sidecar uploads a block and then availableMinTime
// becomes a fixed timestamp.
if r.QueryHints != nil && r.QueryHints.StepMillis != 0 {
diff := availableMinTime - r.MinTime
r.MinTime += (diff / r.QueryHints.StepMillis) * r.QueryHints.StepMillis
// Add one more to strictly fit within --min-time -> infinity.
if r.MinTime != availableMinTime {
r.MinTime += r.QueryHints.StepMillis
}
} else {
r.MinTime = availableMinTime
}
r.MinTime = availableMinTime
}

extLsetToRemove := map[string]struct{}{}
Expand Down