Skip to content

Commit 96d0555

Browse files
committed
HDDS-1718. Increase Ratis Leader election timeout default. Contributed by Aravindan Vijayan & Siddharth Wagle. (#1062)
1 parent 1dc58c5 commit 96d0555

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public final class ScmConfigKeys {
147147
"dfs.ratis.leader.election.minimum.timeout.duration";
148148
public static final TimeDuration
149149
DFS_RATIS_LEADER_ELECTION_MINIMUM_TIMEOUT_DURATION_DEFAULT =
150-
TimeDuration.valueOf(1, TimeUnit.SECONDS);
150+
TimeDuration.valueOf(5, TimeUnit.SECONDS);
151151

152152
public static final String DFS_RATIS_SNAPSHOT_THRESHOLD_KEY =
153153
"dfs.ratis.snapshot.threshold";

hadoop-hdds/common/src/main/resources/ozone-default.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,10 +270,10 @@
270270
</property>
271271
<property>
272272
<name>dfs.ratis.leader.election.minimum.timeout.duration</name>
273-
<value>1s</value>
273+
<value>5s</value>
274274
<tag>OZONE, RATIS, MANAGEMENT</tag>
275275
<description>The minimum timeout duration for ratis leader election.
276-
Default is 1s.
276+
Default is 5s.
277277
</description>
278278
</property>
279279
<property>

hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/TestCloseContainerCommandHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private Container createContainer(final Configuration conf,
298298
maxOutstandingRequests,
299299
TimeDuration.valueOf(3, TimeUnit.SECONDS));
300300
Assert.assertTrue(client.groupAdd(group, peer.getId()).isSuccess());
301-
Thread.sleep(2000);
301+
Thread.sleep(10000);
302302
final ContainerID containerId = ContainerID.valueof(
303303
random.nextLong() & Long.MAX_VALUE);
304304
ContainerProtos.ContainerCommandRequestProto.Builder request =

0 commit comments

Comments
 (0)