CLUSTER DELSLOTSRANGE
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.
Return value
Section titled “Return value”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 |
Examples
Section titled “Examples”127.0.0.1:6379> CLUSTER DELSLOTSRANGE 0 99 200 299OK127.0.0.1:6379> CLUSTER DELSLOTSRANGE 0 10(error) ERR Slot 0 is already unassignedCompatibility
Section titled “Compatibility”Same checks, replies and error strings as Redis 7 and Valkey 8.
See also
Section titled “See also”CLUSTER DELSLOTS, CLUSTER ADDSLOTSRANGE
In a cluster: Scaling a cluster
Was this page helpful?
Thanks for the feedback.