JingsongLi commented on code in PR #8323:
URL: https://github.com/apache/paimon/pull/8323#discussion_r3471518388


##########
paimon-core/src/main/java/org/apache/paimon/jdbc/JdbcCatalog.java:
##########
@@ -569,7 +565,8 @@ public void repairTable(Identifier identifier) throws 
TableNotExistException {
 
     @Override
     public void close() throws Exception {
-        connections.close();
+        // Do not close the connection pool here — it is shared across catalog 
instances
+        // via CachedJdbcClientPool and will be evicted/closed by the cache 
when idle.

Review Comment:
   `close()` now leaves the shared pool in `CachedJdbcClientPool`, but that 
cache never evicts entries or tracks references; it only closes pools in the 
JVM shutdown hook. In long-lived processes that create catalogs with different 
URIs/keys/credentials, closing the catalog no longer releases the JDBC 
connections and the cache can grow for the lifetime of the process. Please add 
a real release/eviction mechanism (for example reference counting) or keep 
`close()` closing the pool when no other catalog instance is using it.



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to