errose28 commented on code in PR #3258:
URL: https://github.com/apache/ozone/pull/3258#discussion_r852499521
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/TestReplicationManager.java:
##########
@@ -1461,6 +1462,71 @@ public void testUnderReplicatedNotHealthySource() throws
IOException {
assertUnderReplicatedCount(1);
}
+ /**
+ * When all the replicas are unstable (unhealthy or quasi-closed with bcsId <
+ * container bcsId), no replica should be deleted.
+ */
+ @Test
+ public void testAllUnstableReplicas() throws Exception {
+ // Default test bcsId for container = 10000L
+ final ContainerInfo container = createContainer(LifeCycleState.CLOSED);
+ addReplica(container, NodeStatus.inServiceHealthy(), QUASI_CLOSED, 990L);
+ addReplica(container, NodeStatus.inServiceHealthy(), QUASI_CLOSED, 990L);
+ addReplica(container, NodeStatus.inServiceHealthy(), UNHEALTHY, 980L);
Review Comment:
Why should SCM not delete the unhealthy container in this case? It seems an
unhealthy container with lower BCSID has no advantage over a quasi-closed
container with higher BCSID. The PR description currently says
>An unhealthy replica should be deleted only if it's bcsId is < than all
quasi-closed and closed replicas bcsId.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]