rymurr commented on a change in pull request #2295:
URL: https://github.com/apache/iceberg/pull/2295#discussion_r595051241



##########
File path: 
spark2/src/main/java/org/apache/iceberg/spark/source/CustomCatalogs.java
##########
@@ -40,6 +43,12 @@
 
 public final class CustomCatalogs {
   private static final Cache<Pair<SparkSession, String>, Catalog> 
CATALOG_CACHE = Caffeine.newBuilder()
+      .expireAfterAccess(10, TimeUnit.MINUTES)

Review comment:
       I agree, I think the timed expiration is potentially worse here. If we 
expire by time then we will be evicting a catalog that is definitely still 
being used by a `SparkSession`. Whereas before it was _maybe_ being used. 
   
   I think that #2325 may actually be the right solution. It moves to a cross 
catalog pool and handles reclaiming client connections regardless of the 
underlying catalog. Then any catalogs in this cache will have 0 connections 
attached to them and can stay in the cache forever. @lcspinter do you agree?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to