Skip to content

Commit

Permalink
Merge pull request #125 from vinted/use_noop_pool
Browse files Browse the repository at this point in the history
store: use noop pool
  • Loading branch information
GiedriusS authored Dec 4, 2024
2 parents b442da7 + 0c08c63 commit 191b114
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions cmd/thanos/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
"github.com/thanos-io/thanos/pkg/info/infopb"
"github.com/thanos-io/thanos/pkg/logging"
"github.com/thanos-io/thanos/pkg/model"
"github.com/thanos-io/thanos/pkg/pool"
"github.com/thanos-io/thanos/pkg/prober"
"github.com/thanos-io/thanos/pkg/runutil"
grpcserver "github.com/thanos-io/thanos/pkg/server/grpc"
Expand Down Expand Up @@ -388,10 +389,7 @@ func runStore(

queriesGate := gate.New(extprom.WrapRegistererWithPrefix("thanos_bucket_store_series_", reg), int(conf.maxConcurrency), gate.Queries)

chunkPool, err := store.NewDefaultChunkBytesPool(uint64(conf.chunkPoolSize))
if err != nil {
return errors.Wrap(err, "create chunk pool")
}
chunkPool := pool.NoopPool[byte]{}

options := []store.BucketStoreOption{
store.WithLogger(logger),
Expand Down
6 changes: 3 additions & 3 deletions pkg/store/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -3515,9 +3515,9 @@ func (r *bucketChunkReader) Close() error {
}
r.block.pendingReaders.Done()

//for _, b := range r.chunkBytes {
// r.block.chunkPool.Put(b)
//}
for _, b := range r.chunkBytes {
r.block.chunkPool.Put(b)
}
return nil
}

Expand Down

0 comments on commit 191b114

Please sign in to comment.