From dd874ab02db04853d4b5952712ab34693f9a93de Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 4 Jan 2023 08:19:36 +0100 Subject: Merging upstream version 1.13.0. Signed-off-by: Daniel Baumann --- iredis/data/commands/cluster-addslotsrange.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 iredis/data/commands/cluster-addslotsrange.md (limited to 'iredis/data/commands/cluster-addslotsrange.md') diff --git a/iredis/data/commands/cluster-addslotsrange.md b/iredis/data/commands/cluster-addslotsrange.md new file mode 100644 index 0000000..a00e23f --- /dev/null +++ b/iredis/data/commands/cluster-addslotsrange.md @@ -0,0 +1,27 @@ +The `CLUSTER ADDSLOTSRANGE` is similar to the `CLUSTER ADDSLOTS` command in that they both assign hash slots to nodes. + +The difference between the two commands is that `ADDSLOTS` takes a list of slots to assign to the node, while `ADDSLOTSRANGE` takes a list of slot ranges (specified by start and end slots) to assign to the node. + +## Example + +To assign slots 1 2 3 4 5 to the node, the `ADDSLOTS` command is: + + > CLUSTER ADDSLOTS 1 2 3 4 5 + OK + +The same operation can be completed with the following `ADDSLOTSRANGE` command: + + > CLUSTER ADDSLOTSRANGE 1 5 + OK + + +## Usage in Redis Cluster + +This command only works in cluster mode and is useful in the following Redis Cluster operations: + +1. To create a new cluster ADDSLOTSRANGE is used in order to initially setup master nodes splitting the available hash slots among them. +2. In order to fix a broken cluster where certain slots are unassigned. + +@return + +@simple-string-reply: `OK` if the command was successful. Otherwise an error is returned. -- cgit v1.2.3