errose28 commented on code in PR #3258:
URL: https://github.com/apache/ozone/pull/3258#discussion_r853537830


##########
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:
   If we think the unhealthy container's BCSID may be inaccurate then I am okay 
with keeping it in this scenario.



-- 
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]

Reply via email to