Skip to content

Commit

Permalink
HDDS-7149. Update ratis version to 2.4.0 and thirdparty version to 1.…
Browse files Browse the repository at this point in the history
…0.2. (#3855)
  • Loading branch information
captainzmc committed Oct 19, 2022
1 parent 11f4686 commit 03e670b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,11 @@ public void notifyConfigurationChanged(long term, long index,

@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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public void testValidateBCSIDOnDnRestart() throws Exception {
// 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
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;
Expand Down Expand Up @@ -273,7 +274,9 @@ public void testInstallCorruptedCheckpointFailure() throws Exception {

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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,12 @@ public synchronized void pause() {
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();
}

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 03e670b

Please sign in to comment.