Skip to content

Commit 09db525

Browse files
dominicqidominic.qiyeya24
authored
Store: Fix panic too smaller buffer (#7658)
Co-authored-by: dominic.qi <[email protected]> Co-authored-by: Ben Ye <[email protected]>
1 parent 9f2af3f commit 09db525

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
1616
- [#7592](https://github.com/thanos-io/thanos/pull/7592) Ruler: Only increment `thanos_rule_evaluation_with_warnings_total` metric for non PromQL warnings.
1717
- [#7614](https://github.com/thanos-io/thanos/pull/7614) *: fix debug log formatting.
1818
- [#7492](https://github.com/thanos-io/thanos/pull/7492) Compactor: update filtered blocks list before second downsample pass.
19+
- [#7658](https://github.com/thanos-io/thanos/pull/7658) Store: Fix panic because too small buffer in pool.
1920
- [#7643](https://github.com/thanos-io/thanos/pull/7643) Receive: fix thanos_receive_write_{timeseries,samples} stats
2021
- [#7644](https://github.com/thanos-io/thanos/pull/7644) fix(ui): add null check to find overlapping blocks logic
2122
- [#7679](https://github.com/thanos-io/thanos/pull/7679) Query: respect store.limit.* flags when evaluating queries

pkg/store/bucket.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3605,10 +3605,10 @@ func (r *bucketChunkReader) loadChunks(ctx context.Context, res []seriesEntry, a
36053605
bufPooled, err := r.block.chunkPool.Get(r.block.estimatedMaxChunkSize)
36063606
if err == nil {
36073607
buf = *bufPooled
3608+
defer r.block.chunkPool.Put(&buf)
36083609
} else {
36093610
buf = make([]byte, r.block.estimatedMaxChunkSize)
36103611
}
3611-
defer r.block.chunkPool.Put(&buf)
36123612

36133613
for i, pIdx := range pIdxs {
36143614
// Fast forward range reader to the next chunk start in case of sparse (for our purposes) byte range.

0 commit comments

Comments
 (0)