You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2026/09/26 17:36:22 UTC

[PR] [core] Shut down the orphan-clean executor when a table clean task fails [paimon]

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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] Shut down the orphan-clean executor when a table clean task fails [paimon]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang closed pull request #10217: [core] Shut down the orphan-clean executor when a table clean task fails
URL: https://github.com/apache/paimon/pull/10217


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [core] Shut down the orphan-clean executor when a table clean task fails [paimon]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #10217:
URL: https://github.com/apache/paimon/pull/10217#issuecomment-5945006658

   Closing. The fix is correct, but the only effect of the bug is a leaked thread pool, and that is visible only through Thread.getAllStackTraces(). No table- or procedure-level assertion can tell the two versions apart, so there is nothing to pin it with end to end.


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org