AndreyBozhko commented on code in PR #2707: URL: https://github.com/apache/solr/pull/2707#discussion_r1759847806
########## solr/core/src/java/org/apache/solr/cloud/ZkController.java: ########## @@ -729,14 +729,16 @@ public void preClose() { try { synchronized (collectionToTerms) { - customThreadPool.submit( - () -> collectionToTerms.values().parallelStream().forEach(ZkCollectionTerms::close)); + collectionToTerms + .values() + .forEach(zkCollectionTerms -> customThreadPool.execute(zkCollectionTerms::close)); } - customThreadPool.submit( - () -> - replicateFromLeaders.values().parallelStream() - .forEach(ReplicateFromLeader::stopReplication)); + replicateFromLeaders + .values() + .forEach( + replicateFromLeader -> + customThreadPool.execute(replicateFromLeader::stopReplication)); Review Comment: That should be OK, - in the `finally` block below, the executor is shut down, so it will await all currently running tasks. -- 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-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org