Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
While looking at some of the other thread leak issues, found that ExecutorUtil#awaitTermination is waiting basically forever:
public static void awaitTermination(ExecutorService pool) { boolean shutdown = false; while (!shutdown) { try { // Wait a while for existing tasks to terminate shutdown = pool.awaitTermination(60, TimeUnit.SECONDS); } catch (InterruptedException ie) { // Preserve interrupt status Thread.currentThread().interrupt(); } } }
Instead it should be possible to wait and then if still not shutdown then interrupt the threads? ie: pool.shutdownNow() then another awaitTermination to at least limit the termination time to 2*60 seconds?
This would at least have some bound to shutting stuff down.
Attachments
Issue Links
- causes
-
SOLR-17261 Core loading is capped at 60 seconds
- Closed
-
SOLR-17000 ExecutorUtilTest failures due to bad concurrency assumptions in test logic
- Closed
- is related to
-
SOLR-16401 Test thread leak linger should be 1s
- Closed
- relates to
-
SOLR-16154 ZKEventListenerThread leaks from tests
- Closed
- links to