mirror of
https://github.com/apache/lucene.git
synced 2025-02-23 02:35:02 +00:00
try to be more aggressive shutting down the search executor in the face of interruption
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1236748 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6d1e24554a
commit
440a7991d3
@ -732,8 +732,17 @@ public final class SolrCore implements SolrInfoMBean {
|
||||
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 SolrInfoMBean {
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user