Skip to content

Commit

Permalink
Store: Fix panic too smaller buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
dominic.qi committed Aug 22, 2024
1 parent 6737c8d commit b5e4ad6
Showing 1 changed file with 1 addition and 1 deletion.
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 b5e4ad6

Please sign in to comment.