nfsantos commented on code in PR #1456: URL: https://github.com/apache/jackrabbit-oak/pull/1456#discussion_r1599889479
########## oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/pipelined/PipelinedMongoDownloadTask.java: ########## @@ -441,23 +441,24 @@ private void downloadWithRetryOnConnectionErrors() throws InterruptedException, // One of the download tasks finished with an exception. Cancel the other one. Trying to cancel the // task that already failed has no effect LOG.info("Error during download. Canceling download threads. Error: {}", e.toString()); - ascendingDownloadFuture.cancel(true); - descendingDownloadFuture.cancel(true); + downloadThreadPool.shutdownNow(); throw new RuntimeException(e); } catch (InterruptedException e) { LOG.info("Thread interrupted. Cancelling download threads."); // The parent thread was interrupted. Shutdown the download threads. - ascendingDownloadFuture.cancel(true); - descendingDownloadFuture.cancel(true); + downloadThreadPool.shutdownNow(); Review Comment: Thanks, I changed it to use ExecutorCloser. I did not knew of this utility class. -- 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: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org