lvfangmin commented on a change in pull request #747: ZOOKEEPER-3218: zk server 
reopened,the interval for observer connect …
URL: https://github.com/apache/zookeeper/pull/747#discussion_r246966748
 
 

 ##########
 File path: 
zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/FastLeaderElection.java
 ##########
 @@ -68,7 +68,34 @@
      * the system up again after long partitions. Currently 60 seconds.
      */
 
-    final static int maxNotificationInterval = 60000;
+    private static int maxNotificationInterval = 60000;
+
+    /**
+     * Lower bound for notification check. The observer don't need to use
+     * the same lower bound as participant members
+     */
+    private static int minNotificationInterval = finalizeWait;
+
+    /**
+     * Minimum notification interval, default is equal to finalizeWait
+     */
+    public static final String MIN_NOTIFICATION_INTERVAL =
+            "zookeeper.fastleader.minNotificationInterval";
+
+    /**
+     * Maximum notification interval, default is 60s
+     */
+    public static final String MAX_NOTIFICATION_INTERVAL =
+            "zookeeper.fastleader.maxNotificationInterval";
+
+    static {
+        minNotificationInterval = Integer.getInteger(MIN_NOTIFICATION_INTERVAL,
+                minNotificationInterval);
 
 Review comment:
   Please use the {} logging format.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to