zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] enixon commented on a change in pull request #972: ZOOKEEPER-2418: txnlog diff sync can skip sending some transactions t…
Date Tue, 02 Jul 2019 18:12:22 GMT
enixon commented on a change in pull request #972: ZOOKEEPER-2418: txnlog diff sync can skip
sending some transactions t…
URL: https://github.com/apache/zookeeper/pull/972#discussion_r299617317
 
 

 ##########
 File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerHandler.java
 ##########
 @@ -820,11 +820,25 @@ boolean syncFollower(long peerLastZxid, LearnerMaster learnerMaster)
{
                     currentZxid = queueCommittedProposals(txnLogItr, peerLastZxid,
                                                          minCommittedLog, maxCommittedLog);
 
-                    LOG.debug("Queueing committedLog 0x" + Long.toHexString(currentZxid));
-                    Iterator<Proposal> committedLogItr = db.getCommittedLog().iterator();
-                    currentZxid = queueCommittedProposals(committedLogItr, currentZxid,
-                                                         null, maxCommittedLog);
-                    needSnap = false;
+                    if (currentZxid < minCommittedLog) {
+                        LOG.info("Detected gap between end of txnlog: " +
 
 Review comment:
   Unfortunately, we do not have data on how often this problem occurs. A (small) spot check
on our production logs didn't turn up any instances but, if memory serves, this was an important
protection in the extreme case. A leader does not perpetually hit this gap code so deposing
it strikes me as overkill.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message