[
https://issues.apache.org/jira/browse/ZOOKEEPER-4772?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17948388#comment-17948388
]
Wenhan Feng commented on ZOOKEEPER-4772:
----------------------------------------
Hi, I just wanted to gently follow up on this issue. Is there anything we can
do to help move it forward? This issue is blocking some of our progress, and we
believe it's a problem worth addressing. Please let us know if there's any
additional information we can provide to help reproduce or diagnose it.
> Wrong sync logic in LearnerHandler when sync (0,0) to a new epoch follower
> --------------------------------------------------------------------------
>
> Key: ZOOKEEPER-4772
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4772
> Project: ZooKeeper
> Issue Type: Bug
> Components: quorum, server
> Affects Versions: 3.7.2, 3.8.3, 3.9.1
> Reporter: May
> Priority: Major
>
> Current LearnerHandler's syncFollower does not consider the situation that
> the proposal (0,0) is committed and snaped. It will not use snap to sync when
> minCommittedLog is 0.
> The bug can be reproduced by modifying testNewEpochZxid in LearnerHandlerTest:
> {code:java}
> public void testNewEpochZxid() throws Exception {
> long peerZxid;
> db.txnLog.add(createProposal(getZxid(0, 0))); // Added
> db.txnLog.add(createProposal(getZxid(0, 1)));
> db.txnLog.add(createProposal(getZxid(1, 1)));
> db.txnLog.add(createProposal(getZxid(1, 2)));
> // After leader election, lastProcessedZxid will point to new epoch
> db.lastProcessedZxid = getZxid(2, 0);
> db.committedLog.add(createProposal(getZxid(0, 0))); // Added
> db.committedLog.add(createProposal(getZxid(1, 1)));
> db.committedLog.add(createProposal(getZxid(1, 2)));
> // Peer has zxid of epoch 0
> peerZxid = getZxid(0, 0);
> // We should get snap, we can do better here, but the main logic is
> // that we should never send diff if we have never seen any txn older
> // than peer zxid
> assertTrue(learnerHandler.syncFollower(peerZxid, leader)); // Fail
> here
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)