yuzegao commented on PR #3295:
URL: https://github.com/apache/kvrocks/pull/3295#issuecomment-3680745964

   > @yuzegao, I'm not sure if you expected to use the migrated/imported slot 
to do the redirection while doing the failover. If yes, it's too tricky to do 
that. You can use the failover state to allow/disallow writing in the 
new/master node instead of mixing the migration behavior with the failover.
   > 
   > Another question is: What if the migration is ongoing?
   Hi, @git-hulk , Thank you very much for your feedback. There is indeed a 
serious risk here.
   Failover and migrate should not be allowed to execute simultaneously. 
Semantically speaking:
   Migration: Smoothly transfers slots from one master to another (horizontal 
scaling up/down).
   Failover: Urgently transfers the master's responsibilities to the slave.
   These two operations have completely different purposes, semantics, and time 
windows. Executing them simultaneously will lead to unpredictable cluster 
states and data corruption.
   
   Please modify as follows and evaluate whether the following modifications 
are reasonable:
   1. Add mutual exclusion checks in the migrate and failover startup processes 
to prevent the two operations from executing simultaneously.
   2. Instead of using migrated/imported variables to control data redirection, 
define an independent state for failover control, making the semantics clearer.
   


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