Skip to content

Commit

Permalink
Make compactor's max_unavailable work with odd number of replicas (#7878
Browse files Browse the repository at this point in the history
)

* Make max_unavailable work with odd number of compactor replicas.

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>

* CHANGELOG.md

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>

---------

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
  • Loading branch information
pstibrany authored Apr 11, 2024
1 parent 3fa89ec commit 7acd737
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
### Jsonnet

* [CHANGE] Memcached: Change default read timeout for chunks and index caches to `750ms` from `450ms`. #7778
* [ENHANCEMENT] Compactor: add `$._config.cortex_compactor_concurrent_rollout_enabled` option (disabled by default) that makes use of rollout-operator to speed up the rollout of compactors. #7783
* [ENHANCEMENT] Compactor: add `$._config.cortex_compactor_concurrent_rollout_enabled` option (disabled by default) that makes use of rollout-operator to speed up the rollout of compactors. #7783 #7878
* [ENHANCEMENT] Shuffle-sharding: add `$._config.shuffle_sharding.ingest_storage_partitions_enabled` and `$._config.shuffle_sharding.ingester_partitions_shard_size` options, that allow configuring partitions shard size in ingest-storage mode. #7804
* [BUGFIX] Guard against missing samples in KEDA queries. #7691

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,15 +860,15 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
annotations:
rollout-max-unavailable: "8"
rollout-max-unavailable: "7"
labels:
name: compactor
rollout-group: compactor
name: compactor
namespace: default
spec:
podManagementPolicy: Parallel
replicas: 16
replicas: 15
selector:
matchLabels:
name: compactor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ mimir {
},

compactor_statefulset+:
$.apps.v1.statefulSet.mixin.spec.withReplicas(16),
$.apps.v1.statefulSet.mixin.spec.withReplicas(15),
}
2 changes: 1 addition & 1 deletion operations/mimir/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
// This feature modifies the compactor StatefulSet which cannot be altered, so if it already exists it has to be deleted and re-applied again in order to be enabled.
cortex_compactor_concurrent_rollout_enabled: false,
// Maximum number of unavailable replicas during a compactor rollout when using cortex_compactor_concurrent_rollout_enabled feature.
cortex_compactor_max_unavailable: std.max($.compactor_statefulset.spec.replicas / 2, 1),
cortex_compactor_max_unavailable: std.max(std.floor($.compactor_statefulset.spec.replicas / 2), 1),

// Enable use of bucket index by querier, ruler and store-gateway.
bucket_index_enabled: true,
Expand Down

0 comments on commit 7acd737

Please sign in to comment.