Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions pkg/storegateway/bucket_stores.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,18 @@ func (u *BucketStores) getOrCreateStore(userID string) (*store.BucketStore, erro
store.WithQueryGate(u.queryGate),
store.WithChunkPool(u.chunksPool),
store.WithSeriesBatchSize(store.SeriesBatchSize),
store.WithBlockEstimatedMaxChunkFunc(func(_ thanos_metadata.Meta) uint64 {
store.WithBlockEstimatedMaxChunkFunc(func(m thanos_metadata.Meta) uint64 {
if m.Thanos.IndexStats.ChunkMaxSize > 0 &&
uint64(m.Thanos.IndexStats.ChunkMaxSize) < u.cfg.BucketStore.EstimatedMaxChunkSizeBytes {
return uint64(m.Thanos.IndexStats.ChunkMaxSize)
}
return u.cfg.BucketStore.EstimatedMaxChunkSizeBytes
}),
store.WithBlockEstimatedMaxSeriesFunc(func(_ thanos_metadata.Meta) uint64 {
store.WithBlockEstimatedMaxSeriesFunc(func(m thanos_metadata.Meta) uint64 {
if m.Thanos.IndexStats.SeriesMaxSize > 0 &&
uint64(m.Thanos.IndexStats.SeriesMaxSize) < u.cfg.BucketStore.EstimatedMaxSeriesSizeBytes {
return uint64(m.Thanos.IndexStats.SeriesMaxSize)
}
return u.cfg.BucketStore.EstimatedMaxSeriesSizeBytes
}),
}
Expand Down