Skip to content

Ask the HotKV docs

Answers come only from these docs and can be wrong; check the linked pages before you rely on them.

CLUSTER DELSLOTSRANGE

Last updated
CLUSTER DELSLOTSRANGE start-slot end-slot [start-slot end-slot ...]
Group
Cluster
Complexity
O(N) where N is the total number of slots in the ranges
Arity
-4 (at least 4 words, counting the command name)
HotKV Cloud
Not available
On-Premise
no license needed

CLUSTER DELSLOTSRANGE works like CLUSTER DELSLOTS, but takes inclusive ranges of slots. As with DELSLOTS, only the receiving node’s view changes.

The ranges are checked in order, and nothing is removed unless every slot of every range has an owner and no slot appears twice.

Simple string OK in RESP2 and RESP3, or one of these errors:

Case Error
A slot is not an integer from 0 to 16383 ERR Invalid or out of range slot
A range starts after it ends ERR start slot number <start> is greater than end slot number <end>
A slot has no owner ERR Slot <slot> is already unassigned
Ranges overlap ERR Slot <slot> specified multiple times
An odd number of slot arguments ERR wrong number of arguments for 'cluster|delslotsrange' command
Cluster mode is off ERR This instance has cluster support disabled
127.0.0.1:6379> CLUSTER DELSLOTSRANGE 0 99 200 299
OK
127.0.0.1:6379> CLUSTER DELSLOTSRANGE 0 10
(error) ERR Slot 0 is already unassigned

Same checks, replies and error strings as Redis 7 and Valkey 8.

CLUSTER DELSLOTS, CLUSTER ADDSLOTSRANGE

In a cluster: Scaling a cluster