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

nicholasjiang pushed a commit to branch branch-0.6
in repository https://gitbox.apache.org/repos/asf/celeborn.git


The following commit(s) were added to refs/heads/branch-0.6 by this push:
     new 4dd63d32b [CELEBORN-2302] Fix NPE in MemoryManager.close() when 
readBufferDispatcher is not initialized
4dd63d32b is described below

commit 4dd63d32b15a1fabf0c718974182b44f666180f9
Author: sychen <[email protected]>
AuthorDate: Wed Apr 8 11:06:35 2026 +0800

    [CELEBORN-2302] Fix NPE in MemoryManager.close() when readBufferDispatcher 
is not initialized
    
    ### What changes were proposed in this pull request?
    Add a null check for readBufferDispatcher before calling close() in 
MemoryManager.close().
    
    ### Why are the changes needed?
    readBufferDispatcher is only initialized when readBufferThreshold > 0.
    
    ### Does this PR resolve a correctness bug?
    No
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    GHA
    
    Closes #3654 from cxzl25/CELEBORN-2302.
    
    Authored-by: sychen <[email protected]>
    Signed-off-by: SteNicholas <[email protected]>
    (cherry picked from commit 7f1bac3443f191d2bc5dcebebb88cd1744b53cd7)
    Signed-off-by: SteNicholas <[email protected]>
---
 .../apache/celeborn/service/deploy/worker/memory/MemoryManager.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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 887c001e1..201d8bac9 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
@@ -586,7 +586,9 @@ public class MemoryManager {
     memoryPressureListeners.clear();
     actionService.shutdown();
     readBufferTargetChangeListeners.clear();
-    readBufferDispatcher.close();
+    if (readBufferDispatcher != null) {
+      readBufferDispatcher.close();
+    }
   }
 
   public ByteBufAllocator getStorageByteBufAllocator() {

Reply via email to