SOLR-7956: There are interrupts on shutdown in places that can cause ChannelAlreadyClosed exceptions which prevents proper closing of transaction logs.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1697707 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2015-08-25 16:00:09 +00:00
parent d27a016088
commit d5d058df69
5 changed files with 7 additions and 13 deletions

View File

@ -150,6 +150,9 @@ Bug Fixes
* SOLR-7949: Resolve XSS issue in Admin UI stats page (David Chiu via janhoy)
* SOLR-7956: There are interrupts on shutdown in places that can cause ChannelAlreadyClosed
exceptions which prevents proper closing of transaction logs. (Mark Miller)
Optimizations
----------------------

View File

@ -298,16 +298,7 @@ public class OverseerProcessor implements Runnable, Closeable {
isClosed = true;
if(tpe != null) {
if (!tpe.isShutdown()) {
tpe.shutdown();
try {
tpe.awaitTermination(60, TimeUnit.SECONDS);
} catch (InterruptedException e) {
log.warn("Thread interrupted while waiting for OCP threadpool close.");
Thread.currentThread().interrupt();
} finally {
if (!tpe.isShutdown())
tpe.shutdownNow();
}
ExecutorUtil.shutdownAndAwaitTermination(tpe);
}
}
}

View File

@ -247,7 +247,7 @@ public class ZkContainer {
zkServer.stop();
}
} finally {
ExecutorUtil.shutdownNowAndAwaitTermination(coreZkRegister);
ExecutorUtil.shutdownAndAwaitTermination(coreZkRegister);
}
}

View File

@ -700,7 +700,7 @@ public class SolrConfigHandler extends RequestHandlerBase {
prop, expectedVersion, concurrentTasks.size(), collection));
Thread.currentThread().interrupt();
} finally {
ExecutorUtil.shutdownNowAndAwaitTermination(parallelExecutor);
ExecutorUtil.shutdownAndAwaitTermination(parallelExecutor);
}
log.info("Took {}ms to set the property {} to be of version {} for collection {}",

View File

@ -219,7 +219,7 @@ public class HttpShardHandlerFactory extends ShardHandlerFactory implements org.
@Override
public void close() {
try {
ExecutorUtil.shutdownNowAndAwaitTermination(commExecutor);
ExecutorUtil.shutdownAndAwaitTermination(commExecutor);
} finally {
try {
if (defaultClient != null) {