Here data means the transactions in log, not the data in ZooKeeper's in-memory tree structure. The transaction must be committed first before gets applied to ZooKeeper's in-memory state.
2014-11-10 2:41 GMT-08:00 Eason Liao <[email protected]>: > It's possible that D, E have more recent data, and the data of D, E will > be discarded if they join leader. This is fine as long as the data is not > COMMITTED. > > We consider the transaction is committed only if the transaction is > persisted in the log of majority servers. In this case, if D, E have the > committed data, then at least > one of A, B, C will also have it. So the committed data won't get lost. > > Hope this answers your question. > > > > 2014-11-10 2:36 GMT-08:00 [email protected] <[email protected]>: > > >> Hi zookeepers, >> >> I got a question about leader election during ensemble starts up. Say, >> I got five servers, ABCDE, and start them one by one. >> According to the election algorithm, ABC forms the majority, and then a >> leader is elected among ABC. When D, E start up, they will follow the >> leader. What if D or E have more recent data among ABCDE? >> D,E's latest data will simply be discard? If this is case, this is a >> critical issue. >> >> Very likely that I missed something how leader election works during >> startup, any explanation on this? thinks. >> >> >> >> >> [email protected] >> > >
