You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "greatsharp (via GitHub)" <gi...@apache.org> on 2024/11/22 12:31:57 UTC

[I] suggest to enable retry migrating the same slot and target shard [kvrocks-controller]

greatsharp opened a new issue, #221:
URL: https://github.com/apache/kvrocks-controller/issues/221

   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] suggest to enable retry migrating the same slot and target shard [kvrocks-controller]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on issue #221:
URL: https://github.com/apache/kvrocks-controller/issues/221#issuecomment-2493719359

   @greatsharp Makes sense.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] suggest to enable retry migrating the same slot and target shard [kvrocks-controller]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk closed issue #221: suggest to enable retry migrating the same slot and target shard 
URL: https://github.com/apache/kvrocks-controller/issues/221


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org