summaryrefslogtreecommitdiff
path: root/redis.conf
diff options
context:
space:
mode:
authorSokolov Yura <funny.falcon@gmail.com>2021-04-04 09:43:24 +0300
committerGitHub <noreply@github.com>2021-04-04 09:43:24 +0300
commit1cab962098a61adc06b1455b93d65e315b7f64e4 (patch)
treea589aa1ae164724aa60360af442e2e4a34085fa6 /redis.conf
parent1eb85249e7e9dafe4fbd023771e53c9a804c0a2f (diff)
downloadredis-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.conf11
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