DFLYCLUSTER SLOT-MIGRATION-STATUS
Syntax
DFLYCLUSTER SLOT-MIGRATION-STATUS [node_id]
Time complexity: O(M + R), where M is the number of migrations on the node and R is the total number of their slot ranges.
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
inorout. - The
node_idof 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
0when no error occurred. Otherwise, it shows the last error description. - The slot ranges included in the migration, formatted as a string.
Examples
# The current node finished migrating four keys in slots 3000 through 9000.
dragonfly> DFLYCLUSTER SLOT-MIGRATION-STATUS
1) 1) "out"
2) "133807dea9b616400e22587b99abd87a1cbf6473"
3) "FINISHED"
4) (integer) 4
5) "0"
6) "[3000, 9000]"