BinyuHuang-nju commented on pull request #1690: URL: https://github.com/apache/zookeeper/pull/1690#issuecomment-844163499
@hanm Maybe it would be inappropriate for me to ask the following questions under this PR. Now I am learning ZAB 1.0 and prepare to write spec. Could you please let me ask about details in it? Currently I have several problems about ZAB 1.0. 1. For some detailed industial implementation (like message with type PING, connection between leader and followers), do I need to implement these in spec? 2. I see before send NEWLEADER, leader will choose a best message from SNAP,TRUNC,DIFF to send according to the corresponding follower's state. Do I need to implement these, or abstract this part and just send NEWLEADER to sync with followers? 3. I don't understand whether variable 'loracle' is more like a global variable that has the latest leader ID and every server can reach it, or 'loracle' is a local variable like 'votedFor' in Raft. (Actually I used the latter in Zab.tla, which corresponds to 'leaderOracle'. And I think it has no effect on correctness no matter which one is used.) 4. The last problem what I want to ask is that about recovery, because I didn't see notes about this part in paper and the link. I saw how the leader handles when a new server wants to join them, but I didn't see how a restarted server finds the latest leader (If 'loracle' is the former in question 3, I can understand this part). A follower must have received corresponding PROPOSAL when receiving COMMIT, if the follower is the initial server that joins Q. But I think this may not always be true when the follower is one that joins Q midway. So I want to know how follower handles to catch up state when receiving COMMIT corresponding to a transaction that not exists in its local history.(You could see this condition in the image at the bottom of README. When I wrote spec for Zab pre-1.0, I choose to keep re-sending CEPOCH to obtain latest transactions until the conflict described above disappers.) I am very sorry if my problems bother you. Thank you for the various feedbacks and suggestions you have provided before! -- 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]
