From e8885ed8051a08c68e1ec04a983d1bcd04e4ede1 Mon Sep 17 00:00:00 2001 From: Wen Xu Date: Wed, 6 Dec 2023 01:16:35 +0000 Subject: [PATCH] turn on cachingbucketenabled in compactor test and add more descript to the feature flag Signed-off-by: Wen Xu --- pkg/compactor/compactor.go | 2 +- pkg/compactor/compactor_test.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/compactor/compactor.go b/pkg/compactor/compactor.go index 03b55f1e0d9..fd8386a737d 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 8998fa4fae5..00a2c9bd497 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 }