You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by GitBox <gi...@apache.org> on 2022/08/17 02:35:09 UTC

[GitHub] [ratis] codings-dan commented on a diff in pull request #713: RATIS-1638. Separate first election timeout

codings-dan commented on code in PR #713:
URL: https://github.com/apache/ratis/pull/713#discussion_r947395421


##########
ratis-server-api/src/main/java/org/apache/ratis/server/RaftServerConfigKeys.java:
##########
@@ -626,6 +626,29 @@ static void setTimeoutMax(RaftProperties properties, TimeDuration maxDuration) {
       setTimeDuration(properties::setTimeDuration, TIMEOUT_MAX_KEY, maxDuration);
     }
 
+    /** separate first timeout so that the startup unavailable time can be reduced */
+    String FIRST_TIMEOUT_MIN_KEY = PREFIX + ".first.timeout.min";
+    TimeDuration FIRST_TIMEOUT_MIN_DEFAULT = null;

Review Comment:
   We should set a default value, otherwise may cause NPE.



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

To unsubscribe, e-mail: issues-unsubscribe@ratis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org