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

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

commit 6b3c7abfd02d0b97e6f0738562dde9664fdfe058
Author: SteNicholas <[email protected]>
AuthorDate: Tue Jul 29 10:30:31 2025 +0800

    [CELEBORN-894][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 #3396 from SteNicholas/CELEBORN-894.
    
    Authored-by: SteNicholas <[email protected]>
    Signed-off-by: SteNicholas <[email protected]>
    (cherry picked from commit 3ff44fae3fbf16f0b3675d47af021ca304cc15fd)
---
 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 f63906224..46714c4e8 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
@@ -36,7 +36,7 @@ public class PushState {
   private final InFlightRequestTracker inFlightRequestTracker;
   // partition id -> CommitMetadata
   private final ConcurrentHashMap<Integer, CommitMetadata> commitMetadataMap =
-      new ConcurrentHashMap<>();
+      JavaUtils.newConcurrentHashMap();
 
   private final Map<String, LocationPushFailedBatches> failedBatchMap;
 

Reply via email to