devmadhuu commented on code in PR #12095:
URL: https://github.com/apache/ozone/pull/12095#discussion_r4666847223


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconStorageContainerSyncHelper.java:
##########
@@ -308,6 +323,11 @@ private int reconcileToQuasiClosed(ContainerID containerID,
     return 0;
   }
 
+  private boolean hasClosedReplica(ContainerID containerID) throws 
ContainerNotFoundException {
+    return containerManager.getContainerReplicas(containerID).stream()
+        .anyMatch(replica -> replica.getState() == 
ContainerReplicaProto.State.CLOSED);

Review Comment:
   Should `hasClosedReplica()` also check that the replica’s sequence ID 
matches the container’s? For example, if the container is at 100 and Recon has 
an old CLOSED replica at 90, SCM would stay QUASI_CLOSED, but this check would 
make Recon skip the correction on every sync while that replica is recorded. 
Because there is a possibility that one is UNHEALTHY Replica plus one other 
CLOSED replica and this method is just checking any CLOSED replica.



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