cluster-getslotmigrations.3valkey - Man Page
Get the status of ongoing and recently finished slot import and export operations.
Synopsis
CLUSTER GETSLOTMIGRATIONS
Description
CLUSTER GETSLOTMIGRATIONS returns an array of information about in-progress and recently completed valkey-atomic-slot-migration(7) atomic slot migrations.
Each job previously started by valkey-cluster-migrateslots(7) CLUSTER MIGRATESLOTS creates a single entry. The number of visible slot migration entries depends on the configured cluster-slot-migration-log-max-len. After the limit is reached, the oldest inactive entry is removed. Note that active slot migrations will always be visible through CLUSTER GETSLOTMIGRATIONS, even if there are more entries than the configured limit.
Information about the slot migration operations is stored in-memory and is not persisted across restarts. Slot migration entries are visible on the primary node of both the target and source shard and the replica nodes of the target shard.
The following information is reported for each slot migration entry:
name: A unique 40 byte name for the slot migrationoperation: The operation performed by the slot migration job on this node (eitherEXPORTorIMPORT)slot_ranges: The range(s) of slots being migrated, with both start and end inclusive. The start and end slot are separated by-in each range, and multiple ranges are joined together with a space (“”).target_node: The primary node receiving the slot ownership as part of the migration. This information is only supplied on the primary node of the participating shards.source_node: The primary node sending the slot ownership as part of the migration. This information is only supplied on the primary node of the participating shards.create_time: The Unix timestamp (in seconds) when the slot migration was started.last_update_time: The Unix timestamp (in seconds) when the slot migration’s status was last changed.last_ack_time: The Unix timestamp (in seconds) when the slot migration last received a heartbeat.state: The current state of the slot migration. The terminal states aresuccessif completed successfully,failedif some unexpected failure occurred, andcancelledif aCLUSTER CANCELSLOTMIGRATIONSrequest was received during the migration. Any other state denotes an active slot migration.message: Either a human readable status message, if there is more information to display about the state, or empty string if no message is available.cow_size: The copy-on-write overhead accumulated while the migration was in progress, in bytes.
Complexity
O(N), where N is the number of active slot import and export jobs.
Acl Categories
@admin @dangerous @slow
History
- Available since: 9.0.0
Examples
Response in RESP 2
127.0.0.1:30001> CLUSTER GETSLOTMIGRATIONS
1) 1) "name"
2) "5371b28997de6fd0bbe813ad8ebdfdf2faadb308"
3) "operation"
4) "EXPORT"
5) "slot_ranges"
6) "0-10"
7) "target_node"
8) "4b4f12fdfb58d5e30fef7b9ad3f1651dacbbaba9"
9) "source_node"
10) "93941e777e17fcbc92d4398cc957ffea888f472b"
11) "create_time"
12) (integer) 1754870400
13) "last_update_time"
14) (integer) 1754870400
15) "last_ack_time"
16) (integer) 1754870400
17) "state"
18) "success"
19) "message"
20) ""
21) "cow_size"
22) (integer) 0Response in RESP 3
127.0.0.1:30001> CLUSTER GETSLOTMIGRATIONS
1) 1# "name" => "5371b28997de6fd0bbe813ad8ebdfdf2faadb308"
2# "operation" => "EXPORT"
3# "slot_ranges" => "0-10"
4# "target_node" => "4b4f12fdfb58d5e30fef7b9ad3f1651dacbbaba9"
5# "source_node" => "93941e777e17fcbc92d4398cc957ffea888f472b"
6# "create_time" => (integer) 1754870400
7# "last_update_time" => (integer) 1754870400
8# "last_ack_time" => (integer) 1754870400
9# "state" => "success"
10# "message" => ""
11# "cow_size" => (integer) 0See Also
asking(3valkey), cluster(3valkey), cluster-addslots(3valkey), cluster-addslotsrange(3valkey), cluster-bumpepoch(3valkey), cluster-cancelslotmigrations(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-getkeysinslot(3valkey), cluster-help(3valkey), cluster-info(3valkey), cluster-keyslot(3valkey), cluster-links(3valkey), cluster-meet(3valkey), cluster-migrateslots(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), cluster-syncslots(3valkey), readonly(3valkey), readwrite(3valkey)