cluster-getkeysinslot.3valkey - Man Page
Returns the key names in a hash slot.
Synopsis
CLUSTER GETKEYSINSLOT
slot count
Description
The command returns an array of keys names stored in the contacted node and hashing to the specified hash slot. The maximum number of keys to return is specified via the count
argument, so that it is possible for the user of this API to batch-processing keys.
The main usage of this command is during rehashing of cluster slots from one node to another. The way the rehashing is performed is exposed in the Valkey Cluster specification, or in a more simple to digest form, as an appendix of the CLUSTER SETSLOT
command documentation.
> CLUSTER GETKEYSINSLOT 7000 3 1) "key_39015" 2) "key_89793" 3) "key_92937"
Reply
valkey-protocol(7) Array reply: an array with up to count elements.
Complexity
O(N) where N is the number of requested keys
Acl Categories
@slow
History
- Available since: 3.0.0
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-delslotsrange(3valkey), cluster-failover(3valkey), cluster-flushslots(3valkey), cluster-forget(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-slots(3valkey), readonly(3valkey), readwrite(3valkey)