You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ascherbakoff (via GitHub)" <gi...@apache.org> on 2025/01/03 07:31:39 UTC

Re: [PR] IGNITE-23304 [ignite-3]

ascherbakoff commented on code in PR #4821:
URL: https://github.com/apache/ignite-3/pull/4821#discussion_r1901529939


##########
modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java:
##########
@@ -447,6 +447,10 @@ public boolean startRaftNode(
             // Thread pools are shared by all raft groups.
             NodeOptions nodeOptions = opts.copy();
 
+            // Then a new election starts on a node, it has local physical time higher than last generated safe ts
+            // because we wait out the clock skew.
+            nodeOptions.setElectionTimeoutMs(Math.max(nodeOptions.getElectionTimeoutMs(), groupOptions.maxClockSkew()));

Review Comment:
   Not quite. We are choosing max of both, so the final value is safe to use:
   `Math.max(nodeOptions.getElectionTimeoutMs(), groupOptions.maxClockSkew())`



-- 
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: notifications-unsubscribe@ignite.apache.org

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