cluster-delslotsrange.3valkey - Man Page
Sets hash slot ranges as unbound for a node.
Synopsis
CLUSTER DELSLOTSRANGE start-slot end-slot [start-slot end-slot ...]
Description
The CLUSTER DELSLOTSRANGE command is similar to the CLUSTER DELSLOTS command in that they both remove hash slots from the node. The difference is that CLUSTER DELSLOTS takes a list of hash slots to remove from the node, while CLUSTER DELSLOTSRANGE takes a list of slot ranges (specified by start and end slots) to remove from the node.
Reply
valkey-protocol(7) Simple string reply: OK if the command was successful. Otherwise an error is returned.
Complexity
O(N) where N is the total number of the slots between the start slot and end slot arguments.
Acl Categories
@admin @dangerous @slow
History
- Available since: 7.0.0
Example
To remove slots 1 2 3 4 5 from the node, the CLUSTER DELSLOTS command is:
> CLUSTER DELSLOTS 1 2 3 4 5 OK
The same operation can be completed with the following CLUSTER DELSLOTSRANGE command:
> CLUSTER DELSLOTSRANGE 1 5 OK
However, note that:
- The command only works if all the specified slots are already associated with the node.
- The command fails if the same slot is specified multiple times.
- As a side effect of the command execution, the node may go into down state because not all hash slots are covered.
Usage in Valkey Cluster
This command only works in cluster mode and may be useful for debugging and in order to manually orchestrate a cluster configuration when a new cluster is created. It is currently not used by valkey-cli, and mainly exists for API completeness.
See Also
asking(3valkey), cluster(3valkey), cluster-addslots(3valkey), cluster-addslotsrange(3valkey), cluster-bumpepoch(3valkey), cluster-count-failure-reports(3valkey), cluster-countkeysinslot(3valkey), cluster-delslots(3valkey), cluster-failover(3valkey), cluster-flushslots(3valkey), cluster-forget(3valkey), cluster-getkeysinslot(3valkey), cluster-help(3valkey), cluster-info(3valkey), cluster-keyslot(3valkey), cluster-links(3valkey), cluster-meet(3valkey), cluster-myid(3valkey), cluster-myshardid(3valkey), cluster-nodes(3valkey), cluster-replicas(3valkey), cluster-replicate(3valkey), cluster-reset(3valkey), cluster-saveconfig(3valkey), cluster-set-config-epoch(3valkey), cluster-setslot(3valkey), cluster-shards(3valkey), cluster-slot-stats(3valkey), cluster-slots(3valkey), readonly(3valkey), readwrite(3valkey)