in controller/cluster.go, method tryUpdateMigrationStatus, it may not get migrating_state or migrating_slot data when executing 'cluster info' cmd on a master node, then switch will select the default case, then the migrating_slot and target_shard_index in cluster info can not be updated any more. this will stop any slot migrate.
suggest to enable retry migrating the same slot and target shard,
if cluster.Shards[sourceShardIdx].IsMigrating() || cluster.Shards[targetShardIdx].IsMigrating() { if !(cluster.Shards[sourceShardIdx].MigratingSlot == slot && cluster.Shards[sourceShardIdx].TargetShardIndex == targetShardIdx) { return consts.ErrShardSlotIsMigrating } }
let the cluster node can exec the 'clusterx migrate' cmd again.
https://github.com/apache/kvrocks-controller/blob/2649b8f08c1bbc851509a4f182970d3294216def/store/cluster.go#L203C1-L205C3
in controller/cluster.go, method tryUpdateMigrationStatus, it may not get migrating_state or migrating_slot data when executing 'cluster info' cmd on a master node, then switch will select the default case, then the migrating_slot and target_shard_index in cluster info can not be updated any more. this will stop any slot migrate.
suggest to enable retry migrating the same slot and target shard,
if cluster.Shards[sourceShardIdx].IsMigrating() || cluster.Shards[targetShardIdx].IsMigrating() { if !(cluster.Shards[sourceShardIdx].MigratingSlot == slot && cluster.Shards[sourceShardIdx].TargetShardIndex == targetShardIdx) { return consts.ErrShardSlotIsMigrating } }
let the cluster node can exec the 'clusterx migrate' cmd again.