You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "moonsphere (via GitHub)" <gi...@apache.org> on 2023/01/30 13:58:36 UTC

[GitHub] [incubator-kvrocks] moonsphere commented on issue #1235: Inconsistent error "Can't write to slot being migrated which is in write forbidden phase"

moonsphere commented on issue #1235:
URL: https://github.com/apache/incubator-kvrocks/issues/1235#issuecomment-1408673739

   Hi, @git-hulk  thanks for the reply.
   
   From the log, we can see it already has `-` prefix 
   
   ```
   server 0.0.0.0:6666 handle error response: -Can't write to slot being migrated which is in write forbidden phase
   ```
   
   My question for this issue is "This error  make a different user experience when the user switches their application from redis-cluster to kvrocks-cluster".
   
   We can imagine that :
   
   1. There are two nodes: `nodeA` and `nodeB`,  `slot1` is on `nodeA`
   2. Admin execute `clusterx migrate` in kvrocks-cluster and `set slots migrating/importing + migrate` in redis-cluster
   3. User's application set a `key1` to nodeA and `key1` belong to `slot1`
   
   For redis cluster:
   
   Due to the single thread execution model, `set key1` will wait `migrate` finished, after that it will find key1 not exist in nodeA then `-ASK + ASKING` to redirect `set key1` to nodeB,  `-ASK` can be right handle by mainstream redis sdk.
   
   But for kvrocks cluster:
   
   `set key1` will meet `forbidden_slot_` mark (after it finish send snapshot) and return a error with `-Can't ...`, all redis sdk could not handle it, the error will throw to application directly.


-- 
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