ellutionist opened a new issue, #1350:
URL: https://github.com/apache/incubator-kvrocks/issues/1350

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-kvrocks/issues) and found no 
similar issues.
   
   
   ### Motivation
   
   For now the command to migrate slot `clusterx migrate` works asynchronously. 
It will return "OK" right after the migration has started. If the client wants 
to know the result of the migration, it has to constantly use "cluster info" to 
get the state.
   
   However, once the migration has been completed, the target slot will be 
forbidden, and the client (cluster manager) has to actively change the topology 
as soon as possible, in order to make the cluster continue to work.
   
   In summary, the current `clusterx migrate` has two shortcuts: 
   1. The client cannot get the result soon enough.
   2. The "polling" approach to get the migration result is not efficient 
enough.
   
   ### Solution
   
   I propose to leave the old `clusterx migrate` command intact, and add a new 
`clusterx bmirate` command, which works like other blocking commands (e.g. 
`blpop`). The server will block the connection and return "OK" (if succeed) or 
other error message (if failed) to the client only after the migration has 
completed.
   
   The command shall be like:
   ```shell
   clusterx bmirate ${SLOT} ${TARGET_NODEID} ${TIMEOUT}
   ```
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to