Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dcache-bulk: handle InterruptedException in DirListTask
Motivation: https://rb.dcache.org/r/14041/ `master@2acfaf8` introduced multithreaded concurrent listing using a `DirListTask`. During cancellation, this stack trace may occur repeatedly: ``` pool-13-thread-24] [] Uncaught exception in thread pool-13-thread-24java.lang.InterruptedException: null at org.dcache.services.bulk.job.AbstractRequestContainerJob.checkForRequestCancellation(AbstractRequestContainerJob.java:396) at org.dcache.services.bulk.job.RequestContainerJob.perform(RequestContainerJob.java:257) at org.dcache.services.bulk.job.RequestContainerJob.handleFileTarget(RequestContainerJob.java:191) at org.dcache.services.bulk.job.AbstractRequestContainerJob$1.doList(AbstractRequestContainerJob.java:442) at org.dcache.services.bulk.job.AbstractRequestContainerJob$DirListTask.run(AbstractRequestContainerJob.java:146) at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:247) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) ``` This is due to the fact that the InterruptedException generated by the cancellation is not handled separately in the wrapped `DirListTask`. Modification: Treat the InterruptedException as a special case, as it should be. Result: No more cluttering of the log file when jobs with ongoing listing activity are cancelled. Target: master Patch: https://rb.dcache.org/r/14091/ Requires-notes: no (unreleased changes) Acked-by: Tigran
- Loading branch information