Skip to content

Commit f5514c8

Browse files
fpetkovskiGiedriusS
authored andcommitted
Merge pull request thanos-io#7885 from fpetkovski/close-loser-tree
Fix bug in Bucket Series
1 parent d83013a commit f5514c8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
2222
- [#7814](https://github.com/thanos-io/thanos/pull/7814) Store: label_values: if matchers contain **name**=="something", do not add <labelname> != "" to fetch less postings.
2323
- [#7679](https://github.com/thanos-io/thanos/pull/7679) Query: respect store.limit.* flags when evaluating queries
2424
- [#7821](https://github.com/thanos-io/thanos/pull/7679) Query/Receive: Fix coroutine leak introduced in https://github.com/thanos-io/thanos/pull/7796.
25+
- [#7843](https://github.com/thanos-io/thanos/pull/7843) Query Frontend: fix slow query logging for non-query endpoints.
26+
- [#7852](https://github.com/thanos-io/thanos/pull/7852) Query Frontend: pass "stats" parameter forward to queriers and fix Prometheus stats merging.
27+
- [#7832](https://github.com/thanos-io/thanos/pull/7832) Query Frontend: Fix cache keys for dynamic split intervals.
28+
- [#7885](https://github.com/thanos-io/thanos/pull/7885) Store: Return chunks to the pool after completing a Series call.
2529

2630
### Added
2731
- [#7763](https://github.com/thanos-io/thanos/pull/7763) Ruler: use native histograms for client latency metrics.

pkg/store/bucket.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1688,10 +1688,12 @@ func (s *BucketStore) Series(req *storepb.SeriesRequest, seriesSrv storepb.Store
16881688
s.metrics.seriesBlocksQueried.WithLabelValues(tenant).Observe(float64(stats.blocksQueried))
16891689
}
16901690

1691+
lt := NewProxyResponseLoserTree(respSets...)
1692+
defer lt.Close()
16911693
// Merge the sub-results from each selected block.
16921694
tracing.DoInSpan(ctx, "bucket_store_merge_all", func(ctx context.Context) {
16931695
begin := time.Now()
1694-
set := NewResponseDeduplicator(NewProxyResponseLoserTree(respSets...))
1696+
set := NewResponseDeduplicator(lt)
16951697
i := 0
16961698
for set.Next() {
16971699
i++

0 commit comments

Comments
 (0)