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

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 04fbe173ef [hotfix] Use safety ConcurrentHashMap in 
IndexFilePathFactories
04fbe173ef is described below

commit 04fbe173ef860fd648b66a65bda6d63a45c82b4d
Author: JingsongLi <jingsongl...@gmail.com>
AuthorDate: Wed Sep 3 18:55:10 2025 +0800

    [hotfix] Use safety ConcurrentHashMap in IndexFilePathFactories
---
 .../src/main/java/org/apache/paimon/utils/DataFilePathFactories.java | 5 +++--
 .../main/java/org/apache/paimon/utils/IndexFilePathFactories.java    | 4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git 
a/paimon-core/src/main/java/org/apache/paimon/utils/DataFilePathFactories.java 
b/paimon-core/src/main/java/org/apache/paimon/utils/DataFilePathFactories.java
index 77f5dce995..e76fdaf8b1 100644
--- 
a/paimon-core/src/main/java/org/apache/paimon/utils/DataFilePathFactories.java
+++ 
b/paimon-core/src/main/java/org/apache/paimon/utils/DataFilePathFactories.java
@@ -21,13 +21,14 @@ package org.apache.paimon.utils;
 import org.apache.paimon.data.BinaryRow;
 import org.apache.paimon.io.DataFilePathFactory;
 
-import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /** Cache for {@link DataFilePathFactory}s. */
 public class DataFilePathFactories {
 
-    private final Map<Pair<BinaryRow, Integer>, DataFilePathFactory> cache = 
new HashMap<>();
+    private final Map<Pair<BinaryRow, Integer>, DataFilePathFactory> cache =
+            new ConcurrentHashMap<>();
     private final FileStorePathFactory pathFactory;
 
     public DataFilePathFactories(FileStorePathFactory pathFactory) {
diff --git 
a/paimon-core/src/main/java/org/apache/paimon/utils/IndexFilePathFactories.java 
b/paimon-core/src/main/java/org/apache/paimon/utils/IndexFilePathFactories.java
index 72e8233a1e..d817175184 100644
--- 
a/paimon-core/src/main/java/org/apache/paimon/utils/IndexFilePathFactories.java
+++ 
b/paimon-core/src/main/java/org/apache/paimon/utils/IndexFilePathFactories.java
@@ -21,13 +21,13 @@ package org.apache.paimon.utils;
 import org.apache.paimon.data.BinaryRow;
 import org.apache.paimon.index.IndexPathFactory;
 
-import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /** Cache for index {@link PathFactory}s. */
 public class IndexFilePathFactories {
 
-    private final Map<Pair<BinaryRow, Integer>, IndexPathFactory> cache = new 
HashMap<>();
+    private final Map<Pair<BinaryRow, Integer>, IndexPathFactory> cache = new 
ConcurrentHashMap<>();
     private final FileStorePathFactory pathFactory;
 
     public IndexFilePathFactories(FileStorePathFactory pathFactory) {

Reply via email to