You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ja...@apache.org on 2022/10/19 07:26:57 UTC
[ozone] branch master updated: HDDS-7149. Update ratis version to 2.4.0 and thirdparty version to 1.0.2. (#3855)
This is an automated email from the ASF dual-hosted git repository.
jacksonyao 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 03e670b865 HDDS-7149. Update ratis version to 2.4.0 and thirdparty version to 1.0.2. (#3855)
03e670b865 is described below
commit 03e670b865bf3381d79ea38d7ff36b5623507803
Author: mingchao zhao <ca...@apache.org>
AuthorDate: Wed Oct 19 15:26:52 2022 +0800
HDDS-7149. Update ratis version to 2.4.0 and thirdparty version to 1.0.2. (#3855)
---
.../main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java | 7 +++++--
.../hadoop/ozone/client/rpc/TestValidateBCSIDOnRestart.java | 2 +-
.../org/apache/hadoop/ozone/scm/TestSCMInstallSnapshotWithHA.java | 5 ++++-
.../apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java | 8 ++++++--
pom.xml | 4 ++--
5 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
index 145a40a665..3d0f226460 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/SCMStateMachine.java
@@ -353,8 +353,11 @@ public class SCMStateMachine extends BaseStateMachine {
@Override
public void pause() {
- getLifeCycle().transition(LifeCycle.State.PAUSING);
- getLifeCycle().transition(LifeCycle.State.PAUSED);
+ final LifeCycle lc = getLifeCycle();
+ if (lc.getCurrentState() != LifeCycle.State.NEW) {
+ lc.transition(LifeCycle.State.PAUSING);
+ lc.transition(LifeCycle.State.PAUSED);
+ }
}
@Override
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestValidateBCSIDOnRestart.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestValidateBCSIDOnRestart.java
index e70ffc54f2..7f00825e34 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestValidateBCSIDOnRestart.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestValidateBCSIDOnRestart.java
@@ -233,7 +233,7 @@ public class TestValidateBCSIDOnRestart {
// in the and what is there in RockSDB and hence the container would be
// marked unhealthy
index = cluster.getHddsDatanodeIndex(dn.getDatanodeDetails());
- cluster.restartHddsDatanode(dn.getDatanodeDetails(), false);
+ cluster.restartHddsDatanode(dn.getDatanodeDetails(), true);
// Make sure the container is marked unhealthy
Assert.assertTrue(
cluster.getHddsDatanodes().get(index)
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestSCMInstallSnapshotWithHA.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestSCMInstallSnapshotWithHA.java
index 084d3f08c1..3b8ad5faf3 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestSCMInstallSnapshotWithHA.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/scm/TestSCMInstallSnapshotWithHA.java
@@ -51,6 +51,7 @@ import org.apache.ratis.server.protocol.TermIndex;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
+import org.apache.ratis.util.LifeCycle;
import org.junit.Assert;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
@@ -273,7 +274,9 @@ public class TestSCMInstallSnapshotWithHA {
Assert.assertTrue(logCapture.getOutput()
.contains("Failed to reload SCM state and instantiate services."));
- Assert.assertTrue(followerSM.getLifeCycleState().isPausingOrPaused());
+ final LifeCycle.State s = followerSM.getLifeCycleState();
+ Assert.assertTrue("Unexpected lifeCycle state: " + s,
+ s == LifeCycle.State.NEW || s.isPausingOrPaused());
// Verify correct reloading
followerSM.setInstallingDBCheckpoint(
diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
index 69b5e56415..7bcc6706a9 100644
--- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
+++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
@@ -391,8 +391,12 @@ public class OzoneManagerStateMachine extends BaseStateMachine {
if (getLifeCycleState() == LifeCycle.State.PAUSED) {
return;
}
- getLifeCycle().transition(LifeCycle.State.PAUSING);
- getLifeCycle().transition(LifeCycle.State.PAUSED);
+ final LifeCycle lc = getLifeCycle();
+ if (lc.getCurrentState() != LifeCycle.State.NEW) {
+ getLifeCycle().transition(LifeCycle.State.PAUSING);
+ getLifeCycle().transition(LifeCycle.State.PAUSED);
+ }
+
ozoneManagerDoubleBuffer.stop();
}
diff --git a/pom.xml b/pom.xml
index 35ad9d7913..d4f621172b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,10 +72,10 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xs
<declared.ozone.version>${ozone.version}</declared.ozone.version>
<!-- Apache Ratis version -->
- <ratis.version>2.3.0</ratis.version>
+ <ratis.version>2.4.0</ratis.version>
<!-- Apache Ratis thirdparty version -->
- <ratis.thirdparty.version>1.0.0</ratis.thirdparty.version>
+ <ratis.thirdparty.version>1.0.2</ratis.thirdparty.version>
<!-- Apache Ranger plugin version -->
<ranger.version>2.3.0</ranger.version>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org