From 811d293a3cec39cdc2932c163639fdd3911e3c99 Mon Sep 17 00:00:00 2001 From: bairen Date: Thu, 8 Jun 2023 11:03:46 +0800 Subject: [PATCH 1/2] Add explain how to remove failed node (#2427) --- docs/management/scaling.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/management/scaling.md b/docs/management/scaling.md index 519242ac7d..e8ef2a835d 100644 --- a/docs/management/scaling.md +++ b/docs/management/scaling.md @@ -875,6 +875,12 @@ over one of its replicas and remove the node after it turned into a replica of t new master. Obviously this does not help when you want to reduce the actual number of masters in your cluster, in that case, a resharding is needed. +Additionally, there is a special scenario where you want to remove a failed node. You should not use the `del-node` command because you will encounter a "connection refused" error. Instead, you can use the `call` command : + + redis-cli --cluster call 127.0.0.1:7000 cluster forget `` + +This command will execute `cluster forget` command on every node. + #### Replica migration In Redis Cluster, you can reconfigure a replica to replicate with a From ece35d4fff3b2510a8fc22da17734949b076cfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20S=C3=B6derqvist?= Date: Fri, 15 Dec 2023 10:05:40 +0100 Subject: [PATCH 2/2] Apply suggestions from code review --- docs/management/scaling.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/management/scaling.md b/docs/management/scaling.md index e8ef2a835d..37a2a7c7c5 100644 --- a/docs/management/scaling.md +++ b/docs/management/scaling.md @@ -875,11 +875,13 @@ over one of its replicas and remove the node after it turned into a replica of t new master. Obviously this does not help when you want to reduce the actual number of masters in your cluster, in that case, a resharding is needed. -Additionally, there is a special scenario where you want to remove a failed node. You should not use the `del-node` command because you will encounter a "connection refused" error. Instead, you can use the `call` command : +There is a special scenario where you want to remove a failed node. +You should not use the `del-node` command because it tries to connect to all nodes and you will encounter a "connection refused" error. +Instead, you can use the `call` command: redis-cli --cluster call 127.0.0.1:7000 cluster forget `` -This command will execute `cluster forget` command on every node. +This command will execute `CLUSTER FORGET` command on every node. #### Replica migration