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

yuxia pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git


The following commit(s) were added to refs/heads/main by this push:
     new 77a8239ef [server] Fix ConcurrentModificationException when access 
getTable concurrently (#2319)
77a8239ef is described below

commit 77a8239efc4cbc940fca93a6efe4708d4d153076
Author: Liebing <[email protected]>
AuthorDate: Wed Jan 7 14:00:10 2026 +0800

    [server] Fix ConcurrentModificationException when access getTable 
concurrently (#2319)
---
 .../java/org/apache/fluss/server/coordinator/MetadataManager.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/fluss-server/src/main/java/org/apache/fluss/server/coordinator/MetadataManager.java
 
b/fluss-server/src/main/java/org/apache/fluss/server/coordinator/MetadataManager.java
index 9d5dc3479..05c5d51de 100644
--- 
a/fluss-server/src/main/java/org/apache/fluss/server/coordinator/MetadataManager.java
+++ 
b/fluss-server/src/main/java/org/apache/fluss/server/coordinator/MetadataManager.java
@@ -606,8 +606,12 @@ public class MetadataManager {
         }
         TableRegistration tableReg = optionalTable.get();
         SchemaInfo schemaInfo = getLatestSchema(tablePath);
-        Map<String, String> tableLakeOptions =
+        Map<String, String> defaultTableLakeOptions =
                 
lakeCatalogDynamicLoader.getLakeCatalogContainer().getDefaultTableLakeOptions();
+        // Create a copy to avoid ConcurrentModificationException when 
multiple threads
+        // call getTable() concurrently, as defaultTableLakeOptions is a 
shared instance
+        Map<String, String> tableLakeOptions =
+                defaultTableLakeOptions != null ? new 
HashMap<>(defaultTableLakeOptions) : null;
         removeSensitiveTableOptions(tableLakeOptions);
         return tableReg.toTableInfo(tablePath, schemaInfo, tableLakeOptions);
     }

Reply via email to