From e61f89220f8bcb13ea8aea1101100600b8a7db9d Mon Sep 17 00:00:00 2001 From: zy-kkk Date: Thu, 11 Sep 2025 01:16:05 +0800 Subject: [PATCH] [fix](paimon) Fix Paimon DLF catalog caching issue by adding dlf.catalog.id to cache key (#55875) ### What problem does this PR solve? #### Problem: Paimon's CachedClientPool uses a static cache with keys based on clientClassName, metastore.uris, and metastore type. For DLF catalogs, all these values are identical, causing different DLF catalogs with different dlf.catalog_id configurations to incorrectly share the same HMS client pool. This results in the last created catalog's configuration overriding previous ones. #### Root Cause: The cache key construction in CachedClientPool.extractKey() doesn't include DLF-specific configuration differences. Multiple catalogs with different dlf.catalog_id values generate identical cache keys, leading to client pool pollution. #### Solution: Add dlf.catalog_id to the cache key by configuring client-pool-cache.keys = "conf:dlf.catalog.id" in PaimonAliyunDLFMetaStoreProperties.appendCustomCatalogOptions(). This ensures each DLF catalog with a unique catalog_id gets its own HMS client pool. --- .../property/metastore/PaimonAliyunDLFMetaStoreProperties.java | 1 + 1 file changed, 1 insertion(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/PaimonAliyunDLFMetaStoreProperties.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/PaimonAliyunDLFMetaStoreProperties.java index 2516cd6e4d0f26..ae4aeda48f877f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/PaimonAliyunDLFMetaStoreProperties.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/property/metastore/PaimonAliyunDLFMetaStoreProperties.java @@ -108,6 +108,7 @@ public Catalog initializeCatalog(String catalogName, List sto @Override protected void appendCustomCatalogOptions() { catalogOptions.set("metastore.client.class", ProxyMetaStoreClient.class.getName()); + catalogOptions.set("client-pool-cache.keys", "conf:" + DataLakeConfig.CATALOG_ID); } @Override