Skip to content

Commit

Permalink
Store: Fix panic too smaller buffer
Browse files Browse the repository at this point in the history
Signed-off-by: dominic.qi <dominic.qi@jaco.live>
  • Loading branch information
dominic.qi committed Aug 22, 2024
1 parent 6737c8d commit 4de3a85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
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
- [#7592](https://github.com/thanos-io/thanos/pull/7592) Ruler: Only increment `thanos_rule_evaluation_with_warnings_total` metric for non PromQL warnings.
- [#7614](https://github.com/thanos-io/thanos/pull/7614) *: fix debug log formatting.
- [#7492](https://github.com/thanos-io/thanos/pull/7492) Compactor: update filtered blocks list before second downsample pass.
- [#7658](https://github.com/thanos-io/thanos/pull/7658) Store: Fix panic because too small buffer in pool.

### Added

Expand Down
2 changes: 1 addition & 1 deletion pkg/store/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -3577,10 +3577,10 @@ func (r *bucketChunkReader) loadChunks(ctx context.Context, res []seriesEntry, a
bufPooled, err := r.block.chunkPool.Get(r.block.estimatedMaxChunkSize)
if err == nil {
buf = *bufPooled
defer r.block.chunkPool.Put(&buf)
} else {
buf = make([]byte, r.block.estimatedMaxChunkSize)
}
defer r.block.chunkPool.Put(&buf)

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

0 comments on commit 4de3a85

Please sign in to comment.