GitHub user zhixinwen added a comment to the discussion: Kvrocks gracefully failover design proposal
I did not read the full post, but if I am implementing this I would do the following: 1. Add new command that does two things: first it would block write on master, second it would wait for replica to fully catch up. The existing WAIT + ACK mechanism can be reused for this. 2. An optional timeout can be added to the command above. If replica catch up within the timeout, then the command is treated as successful. If not, then controller would treat the graceful failover as failed. WAIT timeout can be used for this. 3. Once the command succeeds, which means replica has caught up, controller can start the failover command. The old master will clear up its write forbidden mark once it becomes replica. There shouldn't be a lot of work needed to make it work. GitHub link: https://github.com/apache/kvrocks/discussions/3218#discussioncomment-14840554 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
