ashishkumar50 commented on code in PR #9973:
URL: https://github.com/apache/ozone/pull/9973#discussion_r3027318113
##########
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:
This exception handling is just for read path, if we have reached here that
means file is already created. Or else it would have been caught in write
exception handling which is at L164.
--
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]