From fb16330dfaa7de80de0de5d5f38bd8bfa9d973a1 Mon Sep 17 00:00:00 2001 From: Oleg Zaytsev Date: Tue, 26 Jul 2022 17:24:50 +0200 Subject: [PATCH 1/3] Remove `extend_writes` from Distributor YAML config This is mentioned to be removed in 2.3, so this is a good time to do it. Signed-off-by: Oleg Zaytsev --- pkg/distributor/distributor.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index 696411d209..788fd1cffe 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -141,8 +141,6 @@ type Config struct { MaxRecvMsgSize int `yaml:"max_recv_msg_size" category:"advanced"` RemoteTimeout time.Duration `yaml:"remote_timeout" category:"advanced"` - ExtendWrites bool `yaml:"extend_writes" category:"advanced" doc:"hidden"` // TODO Deprecated: remove in Mimir 2.3.0 - // Distributors ring DistributorRing RingConfig `yaml:"ring"` From fd0f0081678ad2c13ca5f1a1b688fb754d3a1fdd Mon Sep 17 00:00:00 2001 From: Oleg Zaytsev Date: Tue, 26 Jul 2022 17:26:20 +0200 Subject: [PATCH 2/3] Update CHANGELOG.md Signed-off-by: Oleg Zaytsev --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c794a76a3..b7fbdc3f88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * [CHANGE] Change default value for `-distributor.ha-tracker.max-clusters` to `100` to provide a DoS protection. #2465 * [CHANGE] Experimental block upload API exposed by compactor has changed: Previous `/api/v1/upload/block/{block}` endpoint for starting block upload is now `/api/v1/upload/block/{block}/start`, and previous endpoint `/api/v1/upload/block/{block}?uploadComplete=true` for finishing block upload is now `/api/v1/upload/block/{block}/finish`. #2486 * [CHANGE] Compactor: changed `-compactor.max-compaction-time` default from `0s` (disabled) to `1h`. When compacting blocks for a tenant, the compactor will move to compact blocks of another tenant or re-plan blocks to compact at least every 1h. #2514 +* [CHANGE] Distributor: removed previously deprecated `extend_writes` (see #1856) YAML key from the Distributor config. #2551 * [FEATURE] Compactor: Adds the ability to delete partial blocks after a configurable delay. This option can be configured per tenant. #2285 - `-compactor.partial-block-deletion-delay`, as a duration string, allows you to set the delay since a partial block has been modified before marking it for deletion. A value of `0`, the default, disables this feature. - The metric `cortex_compactor_blocks_marked_for_deletion_total` has a new value for the `reason` label `reason="partial"`, when a block deletion marker is triggered by the partial block deletion delay. From 2462bc016345e387d625181caa08df44849fe153 Mon Sep 17 00:00:00 2001 From: Oleg Zaytsev Date: Tue, 26 Jul 2022 17:30:44 +0200 Subject: [PATCH 3/3] Also remove the flag Signed-off-by: Oleg Zaytsev --- CHANGELOG.md | 2 +- pkg/distributor/distributor.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7fbdc3f88..b94f8f539d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ * [CHANGE] Change default value for `-distributor.ha-tracker.max-clusters` to `100` to provide a DoS protection. #2465 * [CHANGE] Experimental block upload API exposed by compactor has changed: Previous `/api/v1/upload/block/{block}` endpoint for starting block upload is now `/api/v1/upload/block/{block}/start`, and previous endpoint `/api/v1/upload/block/{block}?uploadComplete=true` for finishing block upload is now `/api/v1/upload/block/{block}/finish`. #2486 * [CHANGE] Compactor: changed `-compactor.max-compaction-time` default from `0s` (disabled) to `1h`. When compacting blocks for a tenant, the compactor will move to compact blocks of another tenant or re-plan blocks to compact at least every 1h. #2514 -* [CHANGE] Distributor: removed previously deprecated `extend_writes` (see #1856) YAML key from the Distributor config. #2551 +* [CHANGE] Distributor: removed previously deprecated `extend_writes` (see #1856) YAML key and `-distributor.extend-writes` CLI flag from the Distributor config. #2551 * [FEATURE] Compactor: Adds the ability to delete partial blocks after a configurable delay. This option can be configured per tenant. #2285 - `-compactor.partial-block-deletion-delay`, as a duration string, allows you to set the delay since a partial block has been modified before marking it for deletion. A value of `0`, the default, disables this feature. - The metric `cortex_compactor_blocks_marked_for_deletion_total` has a new value for the `reason` label `reason="partial"`, when a block deletion marker is triggered by the partial block deletion delay. diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index 788fd1cffe..d12ca579f9 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -18,7 +18,6 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/limiter" "github.com/grafana/dskit/ring" @@ -176,7 +175,6 @@ func (cfg *Config) RegisterFlags(f *flag.FlagSet, logger log.Logger) { f.IntVar(&cfg.MaxRecvMsgSize, "distributor.max-recv-msg-size", 100<<20, "remote_write API max receive message size (bytes).") f.DurationVar(&cfg.RemoteTimeout, "distributor.remote-timeout", 20*time.Second, "Timeout for downstream ingesters.") - flagext.DeprecatedFlag(f, "distributor.extend-writes", "Deprecated: this setting was used to try writing to an additional ingester in the presence of an ingester not in the ACTIVE state. Mimir now behaves as this setting is always disabled.", logger) f.Float64Var(&cfg.InstanceLimits.MaxIngestionRate, maxIngestionRateFlag, 0, "Max ingestion rate (samples/sec) that this distributor will accept. This limit is per-distributor, not per-tenant. Additional push requests will be rejected. Current ingestion rate is computed as exponentially weighted moving average, updated every second. 0 = unlimited.") f.IntVar(&cfg.InstanceLimits.MaxInflightPushRequests, maxInflightPushRequestsFlag, 2000, "Max inflight push requests that this distributor can handle. This limit is per-distributor, not per-tenant. Additional requests will be rejected. 0 = unlimited.") f.IntVar(&cfg.InstanceLimits.MaxInflightPushRequestsBytes, maxInflightPushRequestsBytesFlag, 0, "The sum of the request sizes in bytes of inflight push requests that this distributor can handle. This limit is per-distributor, not per-tenant. Additional requests will be rejected. 0 = unlimited.")