diff --git a/pkg/compactor/compactor.go b/pkg/compactor/compactor.go index 03b55f1e0d..fd8386a737 100644 --- a/pkg/compactor/compactor.go +++ b/pkg/compactor/compactor.go @@ -249,7 +249,7 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet) { f.DurationVar(&cfg.BlockVisitMarkerFileUpdateInterval, "compactor.block-visit-marker-file-update-interval", 1*time.Minute, "How frequently block visit marker file should be updated duration compaction.") f.BoolVar(&cfg.AcceptMalformedIndex, "compactor.accept-malformed-index", false, "When enabled, index verification will ignore out of order label names.") - f.BoolVar(&cfg.CachingBucketEnabled, "compactor.caching-bucket-enabled", false, "When enabled, caching bucket will be used for compactor, except cleaner service.") + f.BoolVar(&cfg.CachingBucketEnabled, "compactor.caching-bucket-enabled", false, "When enabled, caching bucket will be used for compactor, except cleaner service, which serves as the source of truth for block status") } func (cfg *Config) Validate(limits validation.Limits) error { diff --git a/pkg/compactor/compactor_test.go b/pkg/compactor/compactor_test.go index 8998fa4fae..00a2c9bd49 100644 --- a/pkg/compactor/compactor_test.go +++ b/pkg/compactor/compactor_test.go @@ -1644,6 +1644,9 @@ func prepareConfig() Config { // Set lower timeout for waiting on compactor to become ACTIVE in the ring for unit tests compactorCfg.ShardingRing.WaitActiveInstanceTimeout = 5 * time.Second + // Set CachingBucketEnabled to true + compactorCfg.CachingBucketEnabled = true + return compactorCfg }