krishnaasawa1 commented on code in PR #4901:
URL: https://github.com/apache/ozone/pull/4901#discussion_r1236790049


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1363,4 +1369,12 @@ private void deleteInternal(Container container, boolean 
force)
     container.getContainerData().setState(State.DELETED);
     sendICR(container);
   }
+
+  private void triggerVolumeScanAndThrowException(Container container,

Review Comment:
   We can have multiple containers delete request for same failed volume 
simultaneously or may be at some interval . How that is getting handled? Will 
we scan it for every delete or have a mechanism to avoid multiple scans which 
seems costly, if volume already found failed in one or few initial scans?



##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/KeyValueHandler.java:
##########
@@ -1352,9 +1356,11 @@ private void deleteInternal(Container container, boolean 
force)
       // empty as a defensive check.
       LOG.error("Could not determine if the container {} is empty",
           container.getContainerData().getContainerID(), e);
-      throw new StorageContainerException("Could not determine if container "
-          + container.getContainerData().getContainerID() +
-          " is empty", DELETE_ON_NON_EMPTY_CONTAINER);
+      String errorMsg =
+          "Could not determine if the container " + 
container.getContainerData()
+              .getContainerID() + "is empty";
+      triggerVolumeScanAndThrowException(container, errorMsg,

Review Comment:
   
   What is difference here in overall flow, if we detect here Volume faulty on 
scan or not?  if volume is faulty will container will be removed  and DN will 
report success?
   



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