CLUSTER DELSLOTS
CLUSTER DELSLOTS slot [slot ...]
- Group
- Cluster
- Complexity
- O(N) where N is the number of slots
- Arity
- -3 (at least 3 words, counting the command name)
- HotKV Cloud
- Not available
- On-Premise
- no license needed
CLUSTER DELSLOTS makes the receiving node forget who owns the given hash
slots, whichever node that is. Only this node’s view changes: the other
nodes are not told, and a slot that another node still claims comes back
when that node’s next message arrives. It is mostly useful for repairing a
cluster by hand.
Every slot is checked before any is removed, so the command removes all the slots or none of them. Removing a slot also ends any import of it this node had open.
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 slot has no owner | ERR Slot <slot> is already unassigned |
| The same slot is given twice | ERR Slot <slot> specified multiple times |
| Cluster mode is off | ERR This instance has cluster support disabled |
Examples
Section titled “Examples”127.0.0.1:6379> CLUSTER DELSLOTS 10 11OK127.0.0.1:6379> CLUSTER DELSLOTS 10(error) ERR Slot 10 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 DELSLOTSRANGE, CLUSTER ADDSLOTS, CLUSTER FLUSHSLOTS
In a cluster: Scaling a cluster
Was this page helpful?
Thanks for the feedback.