diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b4ee32d8e..cf15dbcabf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re ### Fixed - [#6650](https://github.com/thanos-io/thanos/pull/6650) Store: fix error handling in decodePostings +- [#6655](https://github.com/thanos-io/thanos/pull/6655) Store: fix bufio pool handling ### Added diff --git a/pkg/store/bucket.go b/pkg/store/bucket.go index 780a2013aa..3db587f742 100644 --- a/pkg/store/bucket.go +++ b/pkg/store/bucket.go @@ -2792,13 +2792,13 @@ func (r *bucketIndexReader) fetchPostings(ctx context.Context, keys []labels.Lab // We assume index does not have any ptrs that has 0 length. length := int64(part.End) - start - brdr := bufioReaderPool.Get().(*bufio.Reader) - defer bufioReaderPool.Put(brdr) - // Fetch from object storage concurrently and update stats and posting list. g.Go(func() error { begin := time.Now() + brdr := bufioReaderPool.Get().(*bufio.Reader) + defer bufioReaderPool.Put(brdr) + partReader, err := r.block.bkt.GetRange(ctx, r.block.indexFilename(), start, length) if err != nil { return errors.Wrap(err, "read postings range")