Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-7149. Update ratis version to 2.4.0 and thirdparty version to 1.0.2. #3855

Merged
merged 11 commits into from
Oct 19, 2022
Merged
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();
Copy link
Contributor

@myskov myskov Oct 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these changes related to bumping ratis version?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (lc.getCurrentState() != LifeCycle.State.NEW) {
lc.transition(LifeCycle.State.PAUSING);
lc.transition(LifeCycle.State.PAUSED);
}
}

@Override
Expand Down
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
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
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
Expand Up @@ -73,10 +73,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