This is an automated email from the ASF dual-hosted git repository.
shashikant pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 85ce71a HDDS-4774. Disable Prevote in Ratis for Ozone by default.
(#1882)
85ce71a is described below
commit 85ce71ac8c2d8417c12902ec1f11bca9a3169d9c
Author: bshashikant <[email protected]>
AuthorDate: Thu Feb 4 15:11:47 2021 +0530
HDDS-4774. Disable Prevote in Ratis for Ozone by default. (#1882)
---
.../container/common/transport/server/ratis/XceiverServerRatis.java | 3 +++
.../java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java | 2 ++
2 files changed, 5 insertions(+)
diff --git
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
index faa69a8..dec60f4 100644
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
@@ -244,6 +244,9 @@ public final class XceiverServerRatis implements
XceiverServerSpi {
// Set the maximum cache segments
RaftServerConfigKeys.Log.setSegmentCacheNumMax(properties, 2);
+ // Disable the pre vote feature in Ratis
+ RaftServerConfigKeys.LeaderElection.setPreVote(properties, false);
+
// Set the ratis storage directory
Collection<String> storageDirPaths =
HddsServerUtil.getOzoneDatanodeRatisDirectory(conf);
diff --git
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java
index f16076e..d99e4c7 100644
---
a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java
+++
b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java
@@ -411,6 +411,8 @@ public final class OzoneManagerRatisServer {
String storageDir = OzoneManagerRatisServer.getOMRatisDirectory(conf);
RaftServerConfigKeys.setStorageDir(properties,
Collections.singletonList(new File(storageDir)));
+ // Disable the pre vote feature in Ratis
+ RaftServerConfigKeys.LeaderElection.setPreVote(properties, false);
// Set RAFT segment size
final int raftSegmentSize = (int) conf.getStorageSize(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]