zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lvfangmin <...@git.apache.org>
Subject [GitHub] zookeeper pull request #588: [ZOOKEEPER-3109] Avoid long unavailable time du...
Date Fri, 03 Aug 2018 16:50:59 GMT
Github user lvfangmin commented on a diff in the pull request:

    --- Diff: src/java/main/org/apache/zookeeper/server/quorum/Leader.java ---
    @@ -1165,6 +1165,58 @@ synchronized public long startForwarding(LearnerHandler handler,
         // VisibleForTesting
         protected final Set<Long> connectingFollowers = new HashSet<Long>();
    +    private volatile boolean quitWaitForEpoch = false;
    +    private volatile long timeStartWaitForEpoch = -1;
    +    private volatile SyncedLearnerTracker voteSet;
    +    public static final String MIN_TIME_WAIT_FOR_EPOCH = "zookeeper.leader.minTimeToWaitForEpoch";
    --- End diff --
    From the quit decision maker, it means the minimum time we should give to the leader to
wait for those epoch proposals.
    From the leader perspective, you can say this is the maximum time it can wait for those
epoch proposals.
    Since this variable is used in the quit decision maker, that's why I called it minTimeToWaitForEpoch.

    Maybe I'm wrong since I'm not native English speaker, I can change it to MAX_TIME_TO_WAIT_FOR_EPOCH
if I get another one vote for this name :)


View raw message