This is an automated email from the ASF dual-hosted git repository.
nicholasjiang 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 7f1bac344 [CELEBORN-2302] Fix NPE in MemoryManager.close() when
readBufferDispatcher is not initialized
7f1bac344 is described below
commit 7f1bac3443f191d2bc5dcebebb88cd1744b53cd7
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]>
---
.../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 7374e9065..0bdf20a75 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
@@ -594,7 +594,9 @@ public class MemoryManager {
memoryPressureListeners.clear();
actionService.shutdown();
readBufferTargetChangeListeners.clear();
- readBufferDispatcher.close();
+ if (readBufferDispatcher != null) {
+ readBufferDispatcher.close();
+ }
}
public ByteBufAllocator getStorageByteBufAllocator() {