ashishkumar50 commented on code in PR #7830:
URL: https://github.com/apache/ozone/pull/7830#discussion_r1988778489


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/StorageVolume.java:
##########
@@ -614,6 +615,14 @@ public synchronized VolumeCheckResult check(@Nullable 
Boolean unused)
       return VolumeCheckResult.HEALTHY;
     }
 
+    // At least some space required to check disk read/write
+    // If there are not enough space remaining,
+    // to avoid volume failure we can ignore checking disk read/write
+    int minimumDiskSpace = Math.max(healthCheckFileSize * 10, HUNDRED_MB);
+    if (volumeInfo.get().getCurrentUsage().getAvailable() < minimumDiskSpace) {
+      return VolumeCheckResult.HEALTHY;

Review Comment:
   Added in sliding window result.
   Updated test to check for both passing/failing `DiskChecks`



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