You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by sh...@apache.org on 2021/02/16 07:22:02 UTC
[ozone] branch HDDS-2823 updated: HDDS-4786. Disable Ratis new
features to be consistent with master branch (#1899)
This is an automated email from the ASF dual-hosted git repository.
shashikant pushed a commit to branch HDDS-2823
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/HDDS-2823 by this push:
new 2cfd618 HDDS-4786. Disable Ratis new features to be consistent with master branch (#1899)
2cfd618 is described below
commit 2cfd618bac125dae61b59c51f04fcf9378dae1ef
Author: Rui Wang <am...@163.com>
AuthorDate: Mon Feb 15 23:21:48 2021 -0800
HDDS-4786. Disable Ratis new features to be consistent with master branch (#1899)
---
.../main/java/org/apache/hadoop/hdds/scm/ha/RatisUtil.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/RatisUtil.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/RatisUtil.java
index b767be8..32e7214 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/RatisUtil.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/RatisUtil.java
@@ -61,6 +61,7 @@ public final class RatisUtil {
setRaftLogProperties(properties, haConf);
setRaftRetryCacheProperties(properties, haConf);
setRaftSnapshotProperties(properties, haConf);
+ setRaftLeadElectionProperties(properties, haConf);
return properties;
}
@@ -109,6 +110,18 @@ public final class RatisUtil {
}
/**
+ * Set properties related to Raft leader election.
+ *
+ * @param properties RaftProperties instance which will be updated
+ * @param conf SCMHAConfiguration
+ */
+ private static void setRaftLeadElectionProperties(
+ final RaftProperties properties, final SCMHAConfiguration conf) {
+ // Disable the pre vote feature (related to leader election) in Ratis
+ RaftServerConfigKeys.LeaderElection.setPreVote(properties, false);
+ }
+
+ /**
* Set properties related to Raft Log.
*
* @param properties RaftProperties instance which will be updated
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org