hanm commented on pull request #1690: URL: https://github.com/apache/zookeeper/pull/1690#issuecomment-859265319
> @hanm There's one point I don't get. > > > When follower receives NEWLEADER, it will apply all previous queued proposals from leader atomically to its state machine. > > It seems like that when some learnerMaster sends NEWLEADER to the corresponding follower, the leader may have not completed sync with a quorum of followers. So some transaction saved by this follower may have not been saved by a quorum, which is not committed and can not be applied from my perspective. Here I don't understand why these queued proposals can be applied. Thank you! You are correct that NEWLEADER does not imply the transactions synced from leader on a follower is quorum committed. That's fine because the follower is not serving traffic (or visible to clients) so sequential consistency is not violated. Later, when leader gets a quorum of ACK of the NEWLEADER from followers, leader will send UPTODATE to the followers and after this the quorum and leadership is established. Followers can serve traffic after receiving UPTODATE. -- 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. For queries about this service, please contact Infrastructure at: [email protected]
