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

zaynt4606 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 8593d5cb07 [CELEBORN-2528][MINOR] Add NONE_PAUSED no-op branch to 
MemoryManager.resumeByPinnedMemory
8593d5cb07 is described below

commit 8593d5cb07a550cc255346a7dca6f0f969641e71
Author: yew1eb <[email protected]>
AuthorDate: Fri Nov 20 10:37:41 2026 +0800

    [CELEBORN-2528][MINOR] Add NONE_PAUSED no-op branch to 
MemoryManager.resumeByPinnedMemory
    
    ### What changes were proposed in this pull request?
    
    Add an explicit no-op `NONE_PAUSED` branch to the `ServingState` switch in 
`MemoryManager.resumeByPinnedMemory`.
    
    ### Why are the changes needed?
    
    Error Prone reports `MissingCasesInEnumSwitch` because the switch only 
handles the two paused states. `NONE_PAUSED` currently cannot reach this method 
and requires no resume action, so behavior is unchanged. Handling it explicitly 
resolves the warning while preserving exhaustive-switch checks for future enum 
additions; using `default` would hide such omissions.
    
    ### Does this PR resolve a correctness bug?
    
    - [ ] Yes
    
    ### Does this PR introduce _any_ user-facing change?
    
    - [ ] Yes
    
    ### How was this patch tested?
    
    - Ran `./build/mvn -pl worker -am -DskipTests compile` successfully and 
confirmed the `MissingCasesInEnumSwitch` warning is resolved.
    - Ran `./build/mvn -pl worker -am -Dtest=none 
-DwildcardSuites=org.apache.celeborn.service.deploy.memory.MemoryManagerSuite 
-Dsurefire.failIfNoSpecifiedTests=false test`: all 8 tests passed.
    - Ran `./build/mvn -pl worker spotless:check` successfully.
    - Ran `git diff --check` successfully.
    
    Closes #3926 from yew1eb/CELEBORN-2528-serving-state-switch.
    
    Authored-by: yew1eb <[email protected]>
    Signed-off-by: zhengtao <[email protected]>
    
    AI-Contributed/Feature: 0/3
    AI-Contributed/UT: 0/0
---
 .../apache/celeborn/service/deploy/worker/memory/MemoryManager.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java
 
b/worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java
index 422a6b6a92..bb315aea0d 100644
--- 
a/worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java
+++ 
b/worker/src/main/java/org/apache/celeborn/service/deploy/worker/memory/MemoryManager.java
@@ -632,6 +632,9 @@ public class MemoryManager {
             getNettyPinnedDirectMemory());
         resumePush();
         break;
+      case NONE_PAUSED:
+        // Nothing to resume.
+        break;
     }
   }
 

Reply via email to