You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/06/01 20:53:01 UTC

[GitHub] [ozone] avijayanhwx commented on a change in pull request #2250: HDDS-5235. Add precheck to avoid ContainerHealthTask setting Deleted containers to Missing state

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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org