SOLR-5583: ConcurrentUpdateSolrServer#blockUntilFinished may wait forever if the executor service is shutdown.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1554053 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-12-29 18:58:18 +00:00
parent 4d0702c348
commit 3b4a1c2c5f
2 changed files with 4 additions and 1 deletions

View File

@ -315,6 +315,9 @@ Bug Fixes
HttpClients and ensure all http connection managers get shutdown. HttpClients and ensure all http connection managers get shutdown.
(Mark Miller) (Mark Miller)
* SOLR-5583: ConcurrentUpdateSolrServer#blockUntilFinished may wait forever if
the executor service is shutdown. (Mark Miller)
Optimizations Optimizations
---------------------- ----------------------

View File

@ -384,7 +384,7 @@ public class ConcurrentUpdateSolrServer extends SolrServer {
synchronized (runners) { synchronized (runners) {
runner = runners.peek(); runner = runners.peek();
} }
if (runner == null) if (runner == null || scheduler.isTerminated())
break; break;
runner.runnerLock.lock(); runner.runnerLock.lock();
runner.runnerLock.unlock(); runner.runnerLock.unlock();