diff --git a/tsdb/compact.go b/tsdb/compact.go index cb5e8d4c16..216036cfca 100644 --- a/tsdb/compact.go +++ b/tsdb/compact.go @@ -947,6 +947,8 @@ type DefaultBlockPopulator struct{} // PopulateBlock fills the index and chunk writers with new data gathered as the union // of the provided blocks. It returns meta information for the new block. // It expects sorted blocks input by mint. +// If there is more than 1 output block, each output block will only contain series that hash into its shard +// (based on total number of output blocks). func (c DefaultBlockPopulator) PopulateBlock(ctx context.Context, metrics *CompactorMetrics, logger log.Logger, chunkPool chunkenc.Pool, mergeFunc storage.VerticalChunkSeriesMergeFunc, concurrencyOpts LeveledCompactorConcurrencyOptions, blocks []BlockReader, minT, maxT int64, outBlocks []shardedBlock) (err error) { if len(blocks) == 0 { return errors.New("cannot populate block(s) from no readers")