Skip to content

Commit

Permalink
Remove deprecated ruler_remote_write_queue_max_shards and min_shards
Browse files Browse the repository at this point in the history
  • Loading branch information
shantanualsi committed Nov 8, 2023
1 parent 4f04263 commit 0807c66
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 48 deletions.
8 changes: 0 additions & 8 deletions docs/sources/configure/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2799,14 +2799,6 @@ The `limits_config` block configures global and per-tenant limits in Loki.
# to keep throughput up while processing occasional slow remote requests.
[ruler_remote_write_queue_capacity: <int>]

# Deprecated: Use 'ruler_remote_write_config' instead. Minimum number of shards,
# i.e. amount of concurrency.
[ruler_remote_write_queue_min_shards: <int>]

# Deprecated: Use 'ruler_remote_write_config' instead. Maximum number of shards,
# i.e. amount of concurrency.
[ruler_remote_write_queue_max_shards: <int>]

# Deprecated: Use 'ruler_remote_write_config' instead. Maximum number of samples
# per send.
[ruler_remote_write_queue_max_samples_per_send: <int>]
Expand Down
2 changes: 0 additions & 2 deletions docs/sources/operations/overrides-exporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ loki_overrides_defaults{limit_name="ruler_remote_write_queue_batch_send_deadline
loki_overrides_defaults{limit_name="ruler_remote_write_queue_capacity"} 0
loki_overrides_defaults{limit_name="ruler_remote_write_queue_max_backoff"} 0
loki_overrides_defaults{limit_name="ruler_remote_write_queue_max_samples_per_send"} 0
loki_overrides_defaults{limit_name="ruler_remote_write_queue_max_shards"} 0
loki_overrides_defaults{limit_name="ruler_remote_write_queue_min_backoff"} 0
loki_overrides_defaults{limit_name="ruler_remote_write_queue_min_shards"} 0
loki_overrides_defaults{limit_name="split_queries_by_interval"} 0
```

Expand Down
2 changes: 0 additions & 2 deletions pkg/ruler/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ type RulesLimits interface {
RulerRemoteWriteRelabelConfigs(userID string) []*util.RelabelConfig
RulerRemoteWriteConfig(userID string, id string) *config.RemoteWriteConfig
RulerRemoteWriteQueueCapacity(userID string) int
RulerRemoteWriteQueueMinShards(userID string) int
RulerRemoteWriteQueueMaxShards(userID string) int
RulerRemoteWriteQueueMaxSamplesPerSend(userID string) int
RulerRemoteWriteQueueBatchSendDeadline(userID string) time.Duration
RulerRemoteWriteQueueMinBackoff(userID string) time.Duration
Expand Down
8 changes: 0 additions & 8 deletions pkg/ruler/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,6 @@ func (r *walRegistry) getTenantRemoteWriteConfig(tenant string, base RemoteWrite
clt.QueueConfig.Capacity = v
}

if v := r.overrides.RulerRemoteWriteQueueMinShards(tenant); v > 0 {
clt.QueueConfig.MinShards = v
}

if v := r.overrides.RulerRemoteWriteQueueMaxShards(tenant); v > 0 {
clt.QueueConfig.MaxShards = v
}

if v := r.overrides.RulerRemoteWriteQueueMaxSamplesPerSend(tenant); v > 0 {
clt.QueueConfig.MaxSamplesPerSend = v
}
Expand Down
16 changes: 0 additions & 16 deletions pkg/validation/limits.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ type Limits struct {
// deprecated use RulerRemoteWriteConfig instead
RulerRemoteWriteQueueCapacity int `yaml:"ruler_remote_write_queue_capacity" json:"ruler_remote_write_queue_capacity" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Number of samples to buffer per shard before we block reading of more samples from the WAL. It is recommended to have enough capacity in each shard to buffer several requests to keep throughput up while processing occasional slow remote requests."`
// deprecated use RulerRemoteWriteConfig instead
RulerRemoteWriteQueueMinShards int `yaml:"ruler_remote_write_queue_min_shards" json:"ruler_remote_write_queue_min_shards" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Minimum number of shards, i.e. amount of concurrency."`
// deprecated use RulerRemoteWriteConfig instead
RulerRemoteWriteQueueMaxShards int `yaml:"ruler_remote_write_queue_max_shards" json:"ruler_remote_write_queue_max_shards" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Maximum number of shards, i.e. amount of concurrency."`
// deprecated use RulerRemoteWriteConfig instead
RulerRemoteWriteQueueMaxSamplesPerSend int `yaml:"ruler_remote_write_queue_max_samples_per_send" json:"ruler_remote_write_queue_max_samples_per_send" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Maximum number of samples per send."`
// deprecated use RulerRemoteWriteConfig instead
RulerRemoteWriteQueueBatchSendDeadline time.Duration `yaml:"ruler_remote_write_queue_batch_send_deadline" json:"ruler_remote_write_queue_batch_send_deadline" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Maximum time a sample will wait in buffer."`
Expand Down Expand Up @@ -631,18 +627,6 @@ func (o *Overrides) RulerRemoteWriteQueueCapacity(userID string) int {
return o.getOverridesForUser(userID).RulerRemoteWriteQueueCapacity
}

// Deprecated: use RulerRemoteWriteConfig instead
// RulerRemoteWriteQueueMinShards returns the minimum shards to use in a remote-write for a given user.
func (o *Overrides) RulerRemoteWriteQueueMinShards(userID string) int {
return o.getOverridesForUser(userID).RulerRemoteWriteQueueMinShards
}

// Deprecated: use RulerRemoteWriteConfig instead
// RulerRemoteWriteQueueMaxShards returns the maximum shards to use in a remote-write for a given user.
func (o *Overrides) RulerRemoteWriteQueueMaxShards(userID string) int {
return o.getOverridesForUser(userID).RulerRemoteWriteQueueMaxShards
}

// Deprecated: use RulerRemoteWriteConfig instead
// RulerRemoteWriteQueueMaxSamplesPerSend returns the max samples to send in a remote-write for a given user.
func (o *Overrides) RulerRemoteWriteQueueMaxSamplesPerSend(userID string) int {
Expand Down
6 changes: 0 additions & 6 deletions tools/deprecated-config-checker/checker/checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ var (
"limits_config.ruler_remote_write_headers",
"limits_config.ruler_remote_write_relabel_configs",
"limits_config.ruler_remote_write_queue_capacity",
"limits_config.ruler_remote_write_queue_min_shards",
"limits_config.ruler_remote_write_queue_max_shards",
"limits_config.ruler_remote_write_queue_max_samples_per_send",
"limits_config.ruler_remote_write_queue_batch_send_deadline",
"limits_config.ruler_remote_write_queue_min_backoff",
Expand Down Expand Up @@ -87,8 +85,6 @@ var (
"overrides.foo.ruler_remote_write_headers",
"overrides.foo.ruler_remote_write_relabel_configs",
"overrides.foo.ruler_remote_write_queue_capacity",
"overrides.foo.ruler_remote_write_queue_min_shards",
"overrides.foo.ruler_remote_write_queue_max_shards",
"overrides.foo.ruler_remote_write_queue_max_samples_per_send",
"overrides.foo.ruler_remote_write_queue_batch_send_deadline",
"overrides.foo.ruler_remote_write_queue_min_backoff",
Expand All @@ -103,8 +99,6 @@ var (
"overrides.bar.ruler_remote_write_headers",
"overrides.bar.ruler_remote_write_relabel_configs",
"overrides.bar.ruler_remote_write_queue_capacity",
"overrides.bar.ruler_remote_write_queue_min_shards",
"overrides.bar.ruler_remote_write_queue_max_shards",
"overrides.bar.ruler_remote_write_queue_max_samples_per_send",
"overrides.bar.ruler_remote_write_queue_batch_send_deadline",
"overrides.bar.ruler_remote_write_queue_min_backoff",
Expand Down
2 changes: 0 additions & 2 deletions tools/deprecated-config-checker/deprecated-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ limits_config:
ruler_remote_write_headers: "Use ruler_remote_write_config instead."
ruler_remote_write_relabel_configs: "Use ruler_remote_write_config instead."
ruler_remote_write_queue_capacity: "Use ruler_remote_write_config instead."
ruler_remote_write_queue_min_shards: "Use ruler_remote_write_config instead."
ruler_remote_write_queue_max_shards: "Use ruler_remote_write_config instead."
ruler_remote_write_queue_max_samples_per_send: "Use ruler_remote_write_config instead."
ruler_remote_write_queue_batch_send_deadline: "Use ruler_remote_write_config instead."
ruler_remote_write_queue_min_backoff: "Use ruler_remote_write_config instead."
Expand Down
2 changes: 0 additions & 2 deletions tools/deprecated-config-checker/test-fixtures/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ limits_config:
ruler_remote_write_headers: ["foo", "bar"] # DEPRECATED
ruler_remote_write_relabel_configs: "foo" # DEPRECATED
ruler_remote_write_queue_capacity: 10 # DEPRECATED
ruler_remote_write_queue_min_shards: 10 # DEPRECATED
ruler_remote_write_queue_max_shards: 100 # DEPRECATED
ruler_remote_write_queue_max_samples_per_send: 50 # DEPRECATED
ruler_remote_write_queue_batch_send_deadline: 10m # DEPRECATED
ruler_remote_write_queue_min_backoff: 1m # DEPRECATED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ overrides:
ruler_remote_write_headers: [ "foo", "bar" ] # DEPRECATED
ruler_remote_write_relabel_configs: "foo" # DEPRECATED
ruler_remote_write_queue_capacity: 10 # DEPRECATED
ruler_remote_write_queue_min_shards: 10 # DEPRECATED
ruler_remote_write_queue_max_shards: 100 # DEPRECATED
ruler_remote_write_queue_max_samples_per_send: 50 # DEPRECATED
ruler_remote_write_queue_batch_send_deadline: 10m # DEPRECATED
ruler_remote_write_queue_min_backoff: 1m # DEPRECATED
Expand Down

0 comments on commit 0807c66

Please sign in to comment.