Sammi Chen created HDDS-14888:
---------------------------------

             Summary: Improve DiskCheckUtil.checkReadWrite to tolerate disk 
full and no handle case
                 Key: HDDS-14888
                 URL: https://issues.apache.org/jira/browse/HDDS-14888
             Project: Apache Ozone
          Issue Type: Improvement
            Reporter: Sammi Chen
            Assignee: Sammi Chen


DiskCheckUtil.checkReadWrite does file write and read check to make sure disk 
is writable and readable. 

If disk is full or process's file handler is exhausted, it will catch the 
exception and return false.  

The outer StorageVolume#check will decide whether mark this time volume check 
as fail or not, depending on whether volume has more than 100B *2 free space. 

As the disk space will dynamically change, so there is change that 
checkReadWrite() is failed due to disk full, while when below logic is 
evaluated, it has enough available space again. 

{code:java}
 if (!diskChecksPassed && getCurrentUsage().getAvailable() < minimumDiskSpace) {
{code}

Further more, if the checkReadWrite() failure is because of file handler 
exhausted, which also could be a temporal failure. 

The goal of this target is to analysis the exception in  checkReadWrite() 
directly, so that disk full and no file handler case will not return false. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to