avijayanhwx commented on a change in pull request #2250:
URL: https://github.com/apache/ozone/pull/2250#discussion_r643466002



##########
File path: 
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java
##########
@@ -146,7 +155,9 @@ private long processExistingDBRecords(long currentTime) {
             currentContainer = setCurrentContainer(rec.getContainerId());
           }
           if (ContainerHealthRecords
-              .retainOrUpdateRecord(currentContainer, rec)) {
+              .retainOrUpdateRecord(currentContainer, rec) &&
+              !containerDeletedInSCM(currentContainer.getContainer())

Review comment:
       Can we make this SCM call only if the container is seen as MISSING, and 
not for mis replicated cases?

##########
File path: 
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/fsck/ContainerHealthTask.java
##########
@@ -185,6 +200,35 @@ private void processContainer(ContainerInfo container, 
long currentTime) {
     }
   }
 
+  private boolean containerDeletedInSCM(ContainerInfo containerInfo) {
+    try {
+      ContainerWithPipeline containerWithPipeline =
+          scmClient.getContainerWithPipeline(containerInfo.getContainerID());

Review comment:
       Is there a way we can maintain the state of a container as DELETED after 
getting the confirmation from SCM once? Since a container DELETED state is 
immutable, we do not need to keep asking the SCM if it is deleted repeatedly.




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

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