This is an automated email from the ASF dual-hosted git repository.

SteNicholas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new c3bee9c5aa [CELEBORN-2310][FOLLOWUP] Account actualUsableSpace while 
excluding workers
c3bee9c5aa is described below

commit c3bee9c5aaf0d05cc9f775401bf731f0d3ad72bb
Author: Sanskar Modi <[email protected]>
AuthorDate: Tue Jun 2 19:57:39 2026 +0800

    [CELEBORN-2310][FOLLOWUP] Account actualUsableSpace while excluding workers
    
    ### What changes were proposed in this pull request?
    
    Account actualUsableSpace while excluding workers. We should use 
`DeviceInfo.isHealthy()` which actually account for available actualUsableSpace.
    
    ### Why are the changes needed?
    
    Currently we are just checking the DiskStatus, which could not be set if 
the device monitor is not enabled.
    
    ### Does this PR resolve a correctness bug?
    
    - [ ] Yes
    
    ### Does this PR introduce _any_ user-facing change?
    
    - [ ] Yes
    
    ### How was this patch tested?
    
    Minor Change.
    
    Closes #3715 from s0nskar/disk_health.
    
    Authored-by: Sanskar Modi <[email protected]>
    Signed-off-by: SteNicholas <[email protected]>
---
 .../service/deploy/master/clustermeta/AbstractMetaManager.java        | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/master/src/main/java/org/apache/celeborn/service/deploy/master/clustermeta/AbstractMetaManager.java
 
b/master/src/main/java/org/apache/celeborn/service/deploy/master/clustermeta/AbstractMetaManager.java
index 11d73c82ab..f726c28919 100644
--- 
a/master/src/main/java/org/apache/celeborn/service/deploy/master/clustermeta/AbstractMetaManager.java
+++ 
b/master/src/main/java/org/apache/celeborn/service/deploy/master/clustermeta/AbstractMetaManager.java
@@ -44,7 +44,6 @@ import org.apache.celeborn.common.identity.UserIdentifier;
 import org.apache.celeborn.common.meta.ApplicationInfo;
 import org.apache.celeborn.common.meta.ApplicationMeta;
 import org.apache.celeborn.common.meta.DiskInfo;
-import org.apache.celeborn.common.meta.DiskStatus;
 import org.apache.celeborn.common.meta.WorkerEventInfo;
 import org.apache.celeborn.common.meta.WorkerInfo;
 import org.apache.celeborn.common.meta.WorkerStatus;
@@ -691,8 +690,7 @@ public abstract class AbstractMetaManager implements 
IMetadataHandler {
   }
 
   private Pair<Boolean, Long> isExceedingUnhealthyThreshold(Map<String, 
DiskInfo> diskMap) {
-    long unhealthyCount =
-        diskMap.values().stream().filter(disk -> 
!disk.status().equals(DiskStatus.HEALTHY)).count();
+    long unhealthyCount = diskMap.values().stream().filter(disk -> 
!disk.isHealthy()).count();
     return new ImmutablePair<>(
         unhealthyCount * 1.0 / diskMap.size() >= unhealthyDiskRatioThreshold, 
unhealthyCount);
   }

Reply via email to