zookeeper-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] hanm commented on a change in pull request #972: ZOOKEEPER-2418: txnlog diff sync can skip sending some transactions t…
Date Fri, 28 Jun 2019 23:42:57 GMT
hanm 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_r298775343
 
 

 ##########
 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:
   I am curious to know if we have any real world data about how often this happens and if
this happens, how many cases leader would able to recover (and how long it would take). I
would imagine if majority of cases a leader fail to catch up, then it would be optimal for
us to force a leader election, rather than keep sending snapshots for a sync (especially if
snapshot is big). Any thought on this?

----------------------------------------------------------------
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