diff options
author | Sokolov Yura <funny.falcon@gmail.com> | 2021-04-04 09:43:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-04 09:43:24 +0300 |
commit | 1cab962098a61adc06b1455b93d65e315b7f64e4 (patch) | |
tree | a589aa1ae164724aa60360af442e2e4a34085fa6 /redis.conf | |
parent | 1eb85249e7e9dafe4fbd023771e53c9a804c0a2f (diff) | |
download | redis-1cab962098a61adc06b1455b93d65e315b7f64e4.tar.gz |
Add cluster-allow-replica-migration option. (#5285)
Previously (and by default after commit) when master loose its last slot
(due to migration, for example), its replicas will migrate to new last slot
holder.
There are cases where this is not desired:
* Consolidation that results with removed nodes (including the replica, eventually).
* Manually configured cluster topologies, which the admin wishes to preserve.
Needlessly migrating a replica triggers a full synchronization and can have a negative impact, so
we prefer to be able to avoid it where possible.
This commit adds 'cluster-allow-replica-migration' configuration option that is
enabled by default to preserve existed behavior. When disabled, replicas will
not be auto-migrated.
Fixes #4896
Co-authored-by: Oran Agra <oran@redislabs.com>
Diffstat (limited to 'redis.conf')
-rw-r--r-- | redis.conf | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/redis.conf b/redis.conf index 2663cfce6..e16fc4bbb 100644 --- a/redis.conf +++ b/redis.conf @@ -1456,12 +1456,21 @@ lua-time-limit 5000 # master in your cluster. # # Default is 1 (replicas migrate only if their masters remain with at least -# one replica). To disable migration just set it to a very large value. +# one replica). To disable migration just set it to a very large value or +# set cluster-allow-replica-migration to 'no'. # A value of 0 can be set but is useful only for debugging and dangerous # in production. # # cluster-migration-barrier 1 +# Turning off this option allows to use less automatic cluster configuration. +# It both disables migration to orphaned masters and migration from masters +# that became empty. +# +# Default is 'yes' (allow automatic migrations). +# +# cluster-allow-replica-migration yes + # By default Redis Cluster nodes stop accepting queries if they detect there # is at least a hash slot uncovered (no available node is serving it). # This way if the cluster is partially down (for example a range of hash slots |