MonkeyCanCode commented on code in PR #14590:
URL: https://github.com/apache/iceberg/pull/14590#discussion_r4444784175


##########
core/src/main/java/org/apache/iceberg/rest/auth/AuthSessionCache.java:
##########
@@ -54,7 +54,7 @@ public class AuthSessionCache implements AutoCloseable {
   public AuthSessionCache(String name, Duration sessionTimeout) {
     this(
         sessionTimeout,
-        ThreadPools.newExitingWorkerPool(name + "-auth-session-evict", 1),
+        ThreadPools.newFixedThreadPool(name + "-auth-session-evict", 1),

Review Comment:
   Hello @nastra ,
   
   When I tested this a few months back, the leak came from this shutdown hook. 
Guava registers it and never removes it, even after close() shuts the pool 
down, so every closed RESTCatalog leaves a hook behind that keeps its 
classloader alive. The threads are daemon threads, so JVM exit isn't blocked. 
rest-metrics-reporter in RESTSessionCatalog already uses the same pattern (ref: 
https://github.com/apache/iceberg/blob/main/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L289).
   
   Thanks,
   Yong



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


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

Reply via email to