Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove configuration options deprecated in 2.2 #3111

Merged
merged 3 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
* [CHANGE] Anonymous usage statistics tracking: added the minimum and maximum value of `-ingester.out-of-order-time-window`. #2940
* [CHANGE] The default hash ring heartbeat period for distributors, ingesters, rulers and compactors has been increased from `5s` to `15s`. Now the default heartbeat period for all Mimir hash rings is `15s`. #3033
* [CHANGE] Reduce the default TSDB head compaction concurrency (`-blocks-storage.tsdb.head-compaction-concurrency`) from 5 to 1, in order to reduce CPU spikes. #3093
* [CHANGE] Previously deprecated `active_series_custom_trackers_config` has been removed. #3110
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rephrased below.

* [CHANGE] Ruler: the ruler's [remote evaluation mode](https://grafana.com/docs/mimir/latest/operators-guide/architecture/components/ruler/#remote) (`-ruler.query-frontend.address`) is now stable. #3109
* [CHANGE] Limits: removed the deprecated YAML configuration option `active_series_custom_trackers_config`. Please use `active_series_custom_trackers` instead. #3110
* [CHANGE] Ingester: removed the deprecated configuration option `-ingester.ring.join-after`. #3111
* [CHANGE] Querier: removed the deprecated configuration option `-querier.shuffle-sharding-ingesters-lookback-period`. The value of `-querier.query-ingesters-within` is now used internally for shuffle sharding lookback, while you can use `-querier.shuffle-sharding-ingesters-enabled` to enable or disable shuffle sharding on the read path. #3111
* [FEATURE] Query-scheduler: added an experimental ring-based service discovery support for the query-scheduler. Refer to [query-scheduler configuration](https://grafana.com/docs/mimir/next/operators-guide/architecture/components/query-scheduler/#configuration) for more information. #2957
* [FEATURE] Introduced the experimental endpoint `/api/v1/user_limits` exposed by all components that load runtime configuration. This endpoint exposes realtime limits for the authenticated tenant, in JSON format. #2864 #3017
* [FEATURE] Query-scheduler: added the experimental configuration option `-query-scheduler.max-used-instances` to restrict the number of query-schedulers effectively used regardless how many replicas are running. This feature can be useful when using the experimental read-write deployment mode. #3005
Expand Down
1 change: 0 additions & 1 deletion pkg/ingester/ingester_ring.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ type RingConfig struct {

// Config for the ingester lifecycle control
ObservePeriod time.Duration `yaml:"observe_period" category:"advanced"`
DeprecatedJoinAfter time.Duration `yaml:"join_after" category:"advanced" doc:"hidden"` // TODO Deprecated: remove in Mimir 2.4.0.
MinReadyDuration time.Duration `yaml:"min_ready_duration" category:"advanced"`
FinalSleep time.Duration `yaml:"final_sleep" category:"advanced"`
ReadinessCheckRingHealth bool `yaml:"readiness_check_ring_health" category:"advanced"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/mimir/mimir.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func (c *Config) RegisterFlags(f *flag.FlagSet, logger log.Logger) {
c.API.RegisterFlags(f)
c.registerServerFlagsWithChangedDefaultValues(f)
c.Distributor.RegisterFlags(f, logger)
c.Querier.RegisterFlags(f, logger)
c.Querier.RegisterFlags(f)
c.IngesterClient.RegisterFlags(f)
c.Ingester.RegisterFlags(f, logger)
c.Flusher.RegisterFlags(f)
Expand Down
4 changes: 3 additions & 1 deletion pkg/mimirtool/config/cortex.go
Original file line number Diff line number Diff line change
Expand Up @@ -1068,10 +1068,12 @@ var removedConfigPaths = append(gemRemovedConfigPath, []string{

// Removed in 2.1, 2.2 and 2.3
"distributor.extend_writes", // -distributor.extend-writes
"ingester.lifecycler.join_after", // -ingester.join-after; is deprecated and will be removed in 2.4, but we can remove it now
"querier.shuffle_sharding_ingesters_lookback_period", // -querier.shuffle-sharding-ingesters-lookback-period
"ruler.flush_period", // -ruler.flush-period
"ruler.search_pending_for", // -ruler.search-pending-for

// Removed in 2.4
"ingester.lifecycler.join_after", // -ingester.join-after
}...)

// CLI options removed since Cortex 1.10.0. These flags only existed as CLI Flags, and were not included in YAML Config.
Expand Down
10 changes: 3 additions & 7 deletions pkg/querier/querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/dskit/flagext"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/labels"
Expand Down Expand Up @@ -57,9 +56,8 @@ type Config struct {
}

const (
queryIngestersWithinFlag = "querier.query-ingesters-within"
queryStoreAfterFlag = "querier.query-store-after"
shuffleShardingIngestersLookbackPeriodFlag = "querier.shuffle-sharding-ingesters-lookback-period"
queryIngestersWithinFlag = "querier.query-ingesters-within"
queryStoreAfterFlag = "querier.query-store-after"
)

var (
Expand All @@ -68,15 +66,13 @@ var (
)

// RegisterFlags adds the flags required to config this to the given FlagSet.
func (cfg *Config) RegisterFlags(f *flag.FlagSet, logger log.Logger) {
func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
cfg.StoreGatewayClient.RegisterFlagsWithPrefix("querier.store-gateway-client", f)
f.BoolVar(&cfg.Iterators, "querier.iterators", false, "Use iterators to execute query, as opposed to fully materialising the series in memory.")
f.BoolVar(&cfg.BatchIterators, "querier.batch-iterators", true, "Use batch iterators to execute query, as opposed to fully materialising the series in memory. Takes precedent over the -querier.iterators flag.")
f.DurationVar(&cfg.QueryIngestersWithin, queryIngestersWithinFlag, 13*time.Hour, "Maximum lookback beyond which queries are not sent to ingester. 0 means all queries are sent to ingester.")
f.DurationVar(&cfg.MaxQueryIntoFuture, "querier.max-query-into-future", 10*time.Minute, "Maximum duration into the future you can query. 0 to disable.")
f.DurationVar(&cfg.QueryStoreAfter, queryStoreAfterFlag, 12*time.Hour, "The time after which a metric should be queried from storage and not just ingesters. 0 means all queries are sent to store. If this option is enabled, the time range of the query sent to the store-gateway will be manipulated to ensure the query end is not more recent than 'now - query-store-after'.")
// TODO(56quarters): Deprecated in Mimir 2.2, remove in Mimir 2.4
flagext.DeprecatedFlag(f, shuffleShardingIngestersLookbackPeriodFlag, fmt.Sprintf("Deprecated: this setting should always be the same as -%s and will now behave as if it is", queryIngestersWithinFlag), logger)
f.BoolVar(&cfg.ShuffleShardingIngestersEnabled, "querier.shuffle-sharding-ingesters-enabled", true, fmt.Sprintf("Fetch in-memory series from the minimum set of required ingesters, selecting only ingesters which may have received series since -%s. If this setting is false or -%s is '0', queriers always query all ingesters (ingesters shuffle sharding on read path is disabled).", queryIngestersWithinFlag, queryIngestersWithinFlag))

cfg.EngineConfig.RegisterFlags(f)
Expand Down