SteNicholas commented on code in PR #2688:
URL: https://github.com/apache/celeborn/pull/2688#discussion_r1719251484


##########
worker/src/main/scala/org/apache/celeborn/service/deploy/worker/storage/StorageManager.scala:
##########
@@ -851,19 +855,27 @@ final private[worker] class StorageManager(conf: 
CelebornConf, workerSource: Abs
           0
         }
       }.sum
-      val fileSystemReportedUsableSpace = Files.getFileStore(
-        Paths.get(diskInfo.mountPoint)).getUsableSpace
+      val fileSystemReportedUsableSpace = 
getFileSystemReportedUsableSpace(diskInfo.mountPoint)
       val workingDirUsableSpace =
         Math.min(diskInfo.configuredUsableSpace - totalUsage, 
fileSystemReportedUsableSpace)
-      logDebug(s"updateDiskInfos  workingDirUsableSpace:$workingDirUsableSpace 
filemeta:$fileSystemReportedUsableSpace conf:${diskInfo.configuredUsableSpace} 
totalUsage:$totalUsage")
-      diskInfo.setUsableSpace(workingDirUsableSpace)
+      val minimumReserveSize =
+        DiskUtils.getMinimumUsableSize(diskInfo, diskReserveSize, 
diskReserveRatio)
+      val usableSpace = workingDirUsableSpace - minimumReserveSize
+      logDebug(s"updateDiskInfos  
workingDirUsableSpace:$workingDirUsableSpace" +

Review Comment:
   ```suggestion
         logDebug(s"updateDiskInfos 
workingDirUsableSpace:$workingDirUsableSpace" +
   ```



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

Reply via email to