Kingsley-working opened a new pull request, #18380:
URL: https://github.com/apache/iceberg/pull/18380

   Each `AuthSessionCache` built through the public constructor registered a 
JVM shutdown hook that is never removed, one per `OAuth2Manager`, and the hook 
thread copies the creating thread's inheritable thread-locals; on a Spark 
Connect driver that pins every closed `SparkSession` until the JVM exits. Those 
caches now share one daemon eviction thread that inherits no thread-locals, 
uses Iceberg's class loader and registers no hook, and `close()` leaves it 
running. A per-cache pool shut down in `close()`, as suggested in #15031, could 
still leak a thread per catalog in Spark, which does not close catalog plugins 
yet (SPARK-54367). Removal notifications from `close()` now finish 
asynchronously, and `name` is unused but kept. Overlaps #18378.
   
   Closes #18377
   
   Test plan:
   - A closed cache does not retain the creating thread's inheritable 
thread-locals (fails on `main`).
   - Closing one cache does not stop eviction for the others.
   - The eviction thread does not inherit thread-locals.
   
   ---
   **AI Disclosure**
   - Model: Claude Opus 5.5
   - Platform/Tool: Claude Code
   - Human Oversight: fully reviewed
   - Prompt Summary: Upstream the shared-evictor workaround from the reporter's 
production deployment (option (a) in #18377) into `AuthSessionCache`, with 
regression tests. The code and tests are generated; the design and its 
production validation are the author's.
   


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