( ctx context.Context, bkt objstore.InstrumentedBucket, logger log.Logger, ranges []int64, noCompBlocksFunc func() map[ulid.ULID]*metadata.NoCompactMark, ringLifecyclerID string, blockVisitMarkerTimeout time.Duration, blockVisitMarkerFileUpdateInterval time.Duration, blockVisitMarkerReadFailed prometheus.Counter, blockVisitMarkerWriteFailed prometheus.Counter, )
| 27 | } |
| 28 | |
| 29 | func NewShuffleShardingPlanner( |
| 30 | ctx context.Context, |
| 31 | bkt objstore.InstrumentedBucket, |
| 32 | logger log.Logger, |
| 33 | ranges []int64, |
| 34 | noCompBlocksFunc func() map[ulid.ULID]*metadata.NoCompactMark, |
| 35 | ringLifecyclerID string, |
| 36 | blockVisitMarkerTimeout time.Duration, |
| 37 | blockVisitMarkerFileUpdateInterval time.Duration, |
| 38 | blockVisitMarkerReadFailed prometheus.Counter, |
| 39 | blockVisitMarkerWriteFailed prometheus.Counter, |
| 40 | ) *ShuffleShardingPlanner { |
| 41 | return &ShuffleShardingPlanner{ |
| 42 | ctx: ctx, |
| 43 | bkt: bkt, |
| 44 | logger: logger, |
| 45 | ranges: ranges, |
| 46 | noCompBlocksFunc: noCompBlocksFunc, |
| 47 | ringLifecyclerID: ringLifecyclerID, |
| 48 | blockVisitMarkerTimeout: blockVisitMarkerTimeout, |
| 49 | blockVisitMarkerFileUpdateInterval: blockVisitMarkerFileUpdateInterval, |
| 50 | blockVisitMarkerReadFailed: blockVisitMarkerReadFailed, |
| 51 | blockVisitMarkerWriteFailed: blockVisitMarkerWriteFailed, |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | func (p *ShuffleShardingPlanner) Plan(_ context.Context, metasByMinTime []*metadata.Meta, _ chan error, _ any) ([]*metadata.Meta, error) { |
| 56 | // Ensure all blocks fits within the largest range. This is a double check |
no outgoing calls