ascherbakoff commented on a change in pull request #481:
URL: https://github.com/apache/ignite-3/pull/481#discussion_r786117747
##########
File path:
modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java
##########
@@ -121,8 +122,18 @@ public JraftServerImpl(ClusterService service, Path
dataPath, NodeOptions opts)
this.opts.setSharedPools(true);
if (opts.getServerName() == null) {
- opts.setServerName(service.localConfiguration().getName());
- }
+ this.opts.setServerName(service.localConfiguration().getName());
+ }
+
+ // Timeout increasing strategy for election timeout. Adjusting happens
according to
+ // {@link
org.apache.ignite.raft.jraft.util.ExponentialBackoffTimeoutStrategy} when a
leader is not elected, after several
+ // consecutive unsuccessful leader elections, which could be
controlled through
+ // {@link
org.apache.ignite.raft.jraft.option.NodeOptions.MAX_ELECTION_ROUNDS_WITHOUT_ADJUSTING}
+ // Max timeout value that {@link
org.apache.ignite.raft.jraft.util.ExponentialBackoffTimeoutStrategy} could
produce is
+ // 11s. This value must be more than timeout of a membership protocol
to remove failed node from the cluster.
+ // In our case, we may assume that 11s could be enough as far as 11s
is greater
Review comment:
Why do we have constants like 11s in javadoc? This is a configurable
propery.
##########
File path:
modules/raft/src/main/java/org/apache/ignite/internal/raft/server/impl/JraftServerImpl.java
##########
@@ -121,8 +122,18 @@ public JraftServerImpl(ClusterService service, Path
dataPath, NodeOptions opts)
this.opts.setSharedPools(true);
if (opts.getServerName() == null) {
- opts.setServerName(service.localConfiguration().getName());
- }
+ this.opts.setServerName(service.localConfiguration().getName());
+ }
+
+ // Timeout increasing strategy for election timeout. Adjusting happens
according to
+ // {@link
org.apache.ignite.raft.jraft.util.ExponentialBackoffTimeoutStrategy} when a
leader is not elected, after several
+ // consecutive unsuccessful leader elections, which could be
controlled through
+ // {@link
org.apache.ignite.raft.jraft.option.NodeOptions.MAX_ELECTION_ROUNDS_WITHOUT_ADJUSTING}
+ // Max timeout value that {@link
org.apache.ignite.raft.jraft.util.ExponentialBackoffTimeoutStrategy} could
produce is
+ // 11s. This value must be more than timeout of a membership protocol
to remove failed node from the cluster.
+ // In our case, we may assume that 11s could be enough as far as 11s
is greater
+ // than suspicion timeout for the 1000 nodes cluster with ping
interval equals 500ms.
+ this.opts.setElectionTimeoutStrategy(new
ExponentialBackoffTimeoutStrategy());
Review comment:
```suggestion
this.opts.setElectionTimeoutStrategy(new
ExponentialBackoffTimeoutStrategy(11_000, 3));
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]