LuciferYang opened a new pull request, #10217: URL: https://github.com/apache/paimon/pull/10217
### Purpose `LocalOrphanFilesClean.executeDatabaseOrphanFiles` submits one clean task per table to a fixed-thread executor, collects each `Future` result in a loop, and calls `executorService.shutdownNow()` after the loop. When any task fails, `Future.get()` raises an `ExecutionException` (or the wait is interrupted), the code wraps it in a `RuntimeException`, and that exception escapes the method before `shutdownNow()` is ever reached. The pool's threads then stay alive for the rest of the client process, leaking one thread pool per failed database-level orphan clean. This wraps the result-collection loop in a `try/finally` so the executor is shut down on every path, whether the loop completes normally or a task fails. ### Tests Added `LocalOrphanFilesCleanTest.testExecuteDatabaseOrphanFilesShutsDownExecutorOnFailure`, which makes a submitted clean task throw, asserts the failure still propagates to the caller, and asserts the JVM thread count returns to the pre-call baseline. It fails on the pre-fix code and passes with the finally block in place. ### API and Format No. ### Documentation No. -- 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]
