We had the same issue. We created a state model like this: Offline -> Bootstrap -> Slave -> Master
The heavy lifting is done in offline to bootstrap. The model has a constraint of one simultaneous transition per partition and we prioritize the transitions as follows: Slave to master Bootstrap to slave Offline to bootstrap All others There is at most one master and one slave. This will make the controller try to bring the higher ranked server all the way to slave before issuing the command for the lower ranked server to go to slave and then making the higher ranked server go to master. I not sure how to bridge the small gap without master, while keeping the single master target. Probably you could do without the bootstrap phase and do the heavy work in offline to slave, while keeping the other constraints Regards, Vlad On Mar 3, 2015 12:47 AM, "Gavin Li" <[email protected]> wrote: > Hi, > > We have each server handle some partitions, and we use Master Slave model. > > We need to do some work when transit from offline to slave, sometimes it > takes long time. So when the server ranked higher in ideal state is up and > doing the work during the transition of offline to slave, the other server > is changed to slave from master. > > This is causing some period of time that there's no master at all which is > problematic. Is it possible to bring the other server down when the higher > rank server is transiting from slave to master instead of when transition > from offline to slave? > > THanks, > Gavin Li >
