This is an automated email from the ASF dual-hosted git repository.
angerszhuuuu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 2f054cd7d [CELEBORN-647][BUG] Fix potential NPE when remove push status
2f054cd7d is described below
commit 2f054cd7d508864cab29759a16e3bef7e6280fc5
Author: Angerszhuuuu <[email protected]>
AuthorDate: Thu Jun 8 17:22:48 2023 +0800
[CELEBORN-647][BUG] Fix potential NPE when remove push status
### What changes were proposed in this pull request?
Fix potential NPE when remove push status
### Why are the changes needed?
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
Closes #1559 from AngersZhuuuu/CELEBORN-647.
Authored-by: Angerszhuuuu <[email protected]>
Signed-off-by: Angerszhuuuu <[email protected]>
---
.../org/apache/celeborn/common/write/InFlightRequestTracker.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java
b/common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java
index 12d4340a6..13e9e7d66 100644
---
a/common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java
+++
b/common/src/main/java/org/apache/celeborn/common/write/InFlightRequestTracker.java
@@ -62,7 +62,12 @@ public class InFlightRequestTracker {
public void removeBatch(int batchId, String hostAndPushPort) {
Set<Integer> batchIdSet = inflightBatchesPerAddress.get(hostAndPushPort);
- batchIdSet.remove(batchId);
+ // TODO: Need to debug why batchIdSet will be null.
+ if (batchIdSet != null) {
+ batchIdSet.remove(batchId);
+ } else {
+ logger.warn("BatchIdSet of {} is null.", hostAndPushPort);
+ }
}
public void onSuccess(String hostAndPushPort) {
@@ -171,6 +176,7 @@ public class InFlightRequestTracker {
public void cleanup() {
if (!inflightBatchesPerAddress.isEmpty()) {
+ logger.warn("Clear {}", this.getClass().getSimpleName());
inflightBatchesPerAddress.clear();
}
pushStrategy.clear();