BinyuHuang-nju commented on pull request #1690: URL: https://github.com/apache/zookeeper/pull/1690#issuecomment-850846721
@Vanlightly @hanm Hi! I have read some codes about zab. But I still cannot understand some details. I want to ask you about them. 1. At line 630 in function 'syncWithLeader' In [Learner.java](https://github.com/apache/zookeeper/blob/master/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java), I see follower in phase SYNCHRONIZATION may receive PROPOSAL and COMMIT. But in paper, leader will add a new server into its 'forwardingFollowers'(Q in paper) only when receiving ack of NEWLEADER from it, so in paper this new server should not receive PROPOSAL or COMMIT because in phase SYNCHRONIZATION it has not sent ACK-NEWLEADER. So here, my question is in ZAB 1.0, when does leader add a newly joined server into its 'forwardingFollowers'?(I am sorry that I didn't find this in code) 2. At line 766 in function 'syncWithLeader' in [Learner.java](https://github.com/apache/zookeeper/blob/master/zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/Learner.java), I see when receiving NEWLEADER, the variable 'packetsNotCommitted' is set as empty, and when receiving UPTODATE, there is no action handling transactions left to commit them. Does that mean follower thinks all transactions committed upon receiving NEWLEADER not UPTODATE?(Actually in papaer and my spec of zab pre-1.0, follower thinks them committed upon receiving UPTODATE) Since these details are related to how to let follower sync with leader in my spec of ZAB 1.0, I want to have a further understanding of them. Thank you! -- 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]
