This is an automated email from the ASF dual-hosted git repository.
ethanfeng 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 74b41bb39 [CELEBORN-1319][CELEBORN-474][FOLLOWUP] PushState uses
JavaUtils#newConcurrentHashMap to speed up ConcurrentHashMap#computeIfAbsent
74b41bb39 is described below
commit 74b41bb39d9a9bebb3c77fbd07c4c180bcdd5227
Author: SteNicholas <[email protected]>
AuthorDate: Thu May 8 19:45:11 2025 +0800
[CELEBORN-1319][CELEBORN-474][FOLLOWUP] PushState uses
JavaUtils#newConcurrentHashMap to speed up ConcurrentHashMap#computeIfAbsent
### What changes were proposed in this pull request?
`PushState ` uses `JavaUtils#newConcurrentHashMap` to speed up
`ConcurrentHashMap#computeIfAbsent`.
### Why are the changes needed?
Celeborn supports JDK8, which could meet the bug mentioned in
[JDK-8161372](https://bugs.openjdk.org/browse/JDK-8161372). Therefore, it's
better to use `JavaUtils#newConcurrentHashMap` to speed up
`ConcurrentHashMap#computeIfAbsent`.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
CI.
Closes #3247 from SteNicholas/CELEBORN-1319.
Authored-by: SteNicholas <[email protected]>
Signed-off-by: mingji <[email protected]>
---
common/src/main/java/org/apache/celeborn/common/write/PushState.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/common/src/main/java/org/apache/celeborn/common/write/PushState.java
b/common/src/main/java/org/apache/celeborn/common/write/PushState.java
index 9f691094b..3977e5d54 100644
--- a/common/src/main/java/org/apache/celeborn/common/write/PushState.java
+++ b/common/src/main/java/org/apache/celeborn/common/write/PushState.java
@@ -41,7 +41,7 @@ public class PushState {
public PushState(CelebornConf conf) {
pushBufferMaxSize = conf.clientPushBufferMaxSize();
inFlightRequestTracker = new InFlightRequestTracker(conf, this);
- failedBatchMap = new ConcurrentHashMap<>();
+ failedBatchMap = JavaUtils.newConcurrentHashMap();
}
public void cleanup() {