ChenSammi commented on code in PR #9973:
URL: https://github.com/apache/ozone/pull/9973#discussion_r3026289301


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/utils/DiskCheckUtil.java:
##########
@@ -173,9 +182,19 @@ public boolean checkReadWrite(File storageDir,
             "for volume check.", testFile.getAbsolutePath()), notFoundEx);
         return false;
       } catch (IOException ioEx) {
+        String ioem = ioEx.getMessage();
+        String causeMsg = ioEx.getCause() != null ? 
ioEx.getCause().getMessage() : null;
+        causeMsg = causeMsg != null ? causeMsg : "";
+        if ((ioem != null && ioem.contains(TOO_MANY_OPEN_FILES)) || 
causeMsg.contains(TOO_MANY_OPEN_FILES)) {
+          LOG.warn("Could not read file {} for volume check.", 
testFile.getAbsolutePath(), ioEx);
+          return true;

Review Comment:
   If TOO_MANY_OPEN_FILES happens, the file is not created yet. 



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