DFLYCLUSTER SLOT-MIGRATION-STATUS
Syntax
DFLYCLUSTER SLOT-MIGRATION-STATUS [node_id]
Time complexity: O(N), where N is the number of migrations on the node
ACL categories: @admin, @slow
The DFLYCLUSTER SLOT-MIGRATION-STATUS
command is used to get the status of one or all slot migrations on a Dragonfly node.
If a node_id
is provided, the result shows the status of the migrations between the current node and the specified node_id
.
Otherwise, it returns the statuses of all migrations on the current node.
Return
Array reply: a nested list of migration info. For each migration, the following fields are returned:
- The migration direction, which can be
in
orout
. - The
node_id
of the migration. - The migration state, which can be
CONNECTING
,SYNC
,ERROR
,FINISHED
, orFATAL
. - The number of keys for selected slots on the current node.
- The error status, which is
0
if no error happens. Otherwise, it shows the last error description.
Examples
# The current node is migrating out to 'node_xfsef234fs'.
# It is currently syncing the data of 2250125 keys.
dragonfly> DFLYCLUSTER SLOT-MIGRATION-STATUS
1) 1) "out"
2) "node_xfsef234fs"
3) "SYNC"
4) (integer) 2250125
5) "0"