Peter Rozsa has posted comments on this change. ( http://gerrit.cloudera.org:8080/24712 )
Change subject: IMPALA-13314: Cache HadoopCatalog instances and use holder pattern for singletons ...................................................................... Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/24712/1/fe/src/main/java/org/apache/impala/catalog/iceberg/IcebergHadoopCatalog.java File fe/src/main/java/org/apache/impala/catalog/iceberg/IcebergHadoopCatalog.java: http://gerrit.cloudera.org:8080/#/c/24712/1/fe/src/main/java/org/apache/impala/catalog/iceberg/IcebergHadoopCatalog.java@54 PS1, Line 54: private static final int MAX_CACHE_SIZE = 64; This config value might be configurable, or using an eviction strategy that is not parameterized http://gerrit.cloudera.org:8080/#/c/24712/1/fe/src/main/java/org/apache/impala/catalog/iceberg/IcebergHadoopCatalog.java@56 PS1, Line 56: private static final Cache<String, IcebergHadoopCatalog> catalogCache_ = : CacheBuilder.newBuilder() : .maximumSize(MAX_CACHE_SIZE) : .removalListener(notification -> { : IcebergHadoopCatalog evicted = (IcebergHadoopCatalog) notification.getValue(); : try { : evicted.hadoopCatalog_.close(); : } catch (IOException e) { : LOG.warn("Failed to close evicted HadoopCatalog for location: {}", : notification.getKey(), e); : } : }) : .build(); : With closing the catalog, there's a race condition window where the eviction mechanism already closed it, and somebody else is still trying to use it. http://gerrit.cloudera.org:8080/#/c/24712/1/fe/src/main/java/org/apache/impala/util/IcebergUtil.java File fe/src/main/java/org/apache/impala/util/IcebergUtil.java: http://gerrit.cloudera.org:8080/#/c/24712/1/fe/src/main/java/org/apache/impala/util/IcebergUtil.java@187 PS1, Line 187: }; The default case should remain. -- To view, visit http://gerrit.cloudera.org:8080/24712 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ibb3a6c8e4f1d2a9e7c5b0f8d3e6a4c2b1d0e9f7a Gerrit-Change-Number: 24712 Gerrit-PatchSet: 1 Gerrit-Owner: Nandor Kollar <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Peter Rozsa <[email protected]> Gerrit-Comment-Date: Wed, 19 Aug 2026 12:52:09 +0000 Gerrit-HasComments: Yes
