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


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerScanHelper.java:
##########
@@ -115,8 +115,17 @@ public void scanMetadata(Container<?> container)
     logScanCompleted(containerData, now);
   }
 
+  /**
+   * Marks container UNHEALTHY when the scan reports real errors.
+   * If every scan error is related to file-descriptor exhaustion, return 
without marking container unhealthy.
+   */
   public void handleUnhealthyScanResult(ContainerData containerData, 
ScanResult result) throws IOException {
     long containerID = containerData.getContainerID();
+    if (ScanTransientIOUtil.scanErrorsAreOnlyTooManyOpenFiles(result)) {
+      log.warn("Skipped marking container UNHEALTHY [{}]: scan failed due to 
transient " +
+          "file descriptor exhaustion ('Too many open files'). {}", 
containerID, result);
+      return;
+    }

Review Comment:
   > currently handleUnhealthyScanResult is called after 
updateContainerChecksum, is this order on purpose?
   
   After reconciliation, we scan and update checksums of containers even if 
they are unhealthy, since we still need the ability to repair them. We don't 
want to exit early and not update the checksum if the container is unhealthy. 
Not sure if I understood the question specifically though.



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