You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2012/01/27 17:40:49 UTC
svn commit: r1236748 -
/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrCore.java
Author: markrmiller
Date: Fri Jan 27 16:40:49 2012
New Revision: 1236748
URL: http://svn.apache.org/viewvc?rev=1236748&view=rev
Log:
try to be more aggressive shutting down the search executor in the face of interruption
Modified:
lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrCore.java
Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrCore.java?rev=1236748&r1=1236747&r2=1236748&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/core/SolrCore.java Fri Jan 27 16:40:49 2012
@@ -732,8 +732,17 @@ public final class SolrCore implements S
if (!searcherExecutor.awaitTermination(60, TimeUnit.SECONDS)) {
log.error("Timeout waiting for searchExecutor to terminate");
}
+ } catch (InterruptedException e) {
+ searcherExecutor.shutdownNow();
+ try {
+ if (!searcherExecutor.awaitTermination(30, TimeUnit.SECONDS)) {
+ log.error("Timeout waiting for searchExecutor to terminate");
+ }
+ } catch (InterruptedException e2) {
+ SolrException.log(log, e2);
+ }
} catch (Exception e) {
- SolrException.log(log,e);
+ SolrException.log(log, e);
}
try {
// Since we waited for the searcherExecutor to shut down,
@@ -744,7 +753,7 @@ public final class SolrCore implements S
// then the searchExecutor will throw an exception when getSearcher()
// tries to use it, and the exception handling code should close it.
closeSearcher();
- } catch (Exception e) {
+ } catch (Throwable e) {
SolrException.log(log,e);
}