You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by enixon <gi...@git.apache.org> on 2018/10/09 22:53:53 UTC
[GitHub] zookeeper pull request #628: ZOOKEEPER-3140: Allow Followers to host Observe...
Github user enixon commented on a diff in the pull request:
https://github.com/apache/zookeeper/pull/628#discussion_r223888479
--- Diff: src/java/main/org/apache/zookeeper/server/quorum/Learner.java ---
@@ -84,8 +84,12 @@ public Socket getSocket() {
protected static final Logger LOG = LoggerFactory.getLogger(Learner.class);
+ private static final int leaderConnectDelayDuringRetryMs =
+ Integer.getInteger("zookeeper.leaderConnectDelayDuringRetryMs", 100);
--- End diff --
The change was inspired by an Observer potentially taking a long time to recover after a leader election if the first LearnerMaster that it hooked in to was a Follower that was lagging in syncing with the leader. Rather than fixate on this slow Follower, the Observer can be moved along to a new LearnerMaster with minimal delay.
---