Hi bit1129, * What does atomic in ZAB really mean? Does it mean that when the proposal commits, it(including leader and follower) modifies the server state in an atomic way? It means all zookeeper server will commit the write transaction or none of them does. (not 100% sure)
* a. If no majority of followers acknowledge the proposal, then very likely that the ensemble are in network issue or in chaos, then if this does happen, how does the ensemble proceed? There is timeout for each write transaction, if the timeout elapse and the majority does reach, simply the request will ignore (not deliver), the next write request will start process. * If there is majority of followers that acknowledge the proposal and commit the proposal, what about the othere followers that are not in this majority, say, one is out of sync with the leader, what happens to this follower? Will it sync with the leader to keep the state update? Assume we have 5 zookeeper servers (A, B, C, D, E) and A is a leader and the other are follower. Now the write request comes to the leader, leader send a proposal to the followers and itself. Let’s say A, B, C, D send ACK to the leader but D does not. If the timeout elapse for D (for send ack), the leader will drop D server from ensemble. Whenever the D join the Zookeeper, the leader will send DIFF or snapshot to D making it in consistent state. It sends DIFF or Snapshot, this depends on how far D is compared to A state. I hope this make sense to you Ibrahim -----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Wednesday, November 05, 2014 01:54 ص To: dev Subject: Question about ZAB Hi Zookeepers, I got two questions that I am not certain about the behavior of ZAB, so I would ask. 1. What does atomic in ZAB really mean? Does it mean that when the proposal commits, it(including leader and follower) modifies the server state in an atomic way? 2.When a leader raises a proposal, and the followers ackownlege it, then the leader broadcasts the commit message to let the followers to commit the proposal.In this regulare process, there are two exceptional cases: a. If no majority of followers acknowledge the proposal, then very likely that the ensemble are in network issue or in chaos, then if this does happen, how does the ensemble proceed? b. If there is majority of followers that acknowledge the proposal and commit the proposal, what about the othere followers that are not in this majority, say, one is out of sync with the leader, what happens to this follower? Will it sync with the leader to keep the state update? Thanks! -Todd
