From 9d8a2faf18640d96f86253888829d04c0c8e7427 Mon Sep 17 00:00:00 2001 From: markrmiller Date: Fri, 10 Feb 2017 09:39:36 -0500 Subject: [PATCH] SOLR-9903: Stop interrupting the update executor on shutdown, it can cause graceful shutdowns to put replicas into Leader Initiated Recovery among other undesirable things. --- solr/CHANGES.txt | 2 ++ .../src/java/org/apache/solr/update/UpdateShardHandler.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 7087d28d30c..ccd539fa9af 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -136,6 +136,8 @@ New Features numeric, and conditional evaluators. BooleanOperations have been removed in preference of BooleanEvaluators. (Dennis Gove) +* SOLR-9903: Stop interrupting the update executor on shutdown, it can cause graceful shutdowns to put replicas into Leader + Initiated Recovery among other undesirable things. (Mark Miller) Bug Fixes ---------------------- diff --git a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java index 5affae6c050..9d4eb7d1eed 100644 --- a/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java +++ b/solr/core/src/java/org/apache/solr/update/UpdateShardHandler.java @@ -178,8 +178,8 @@ public class UpdateShardHandler implements SolrMetricProducer, SolrInfoMBean { public void close() { try { - // we interrupt on purpose here, but this executor should not run threads that do disk IO! - ExecutorUtil.shutdownWithInterruptAndAwaitTermination(updateExecutor); + // do not interrupt, do not interrupt + ExecutorUtil.shutdownAndAwaitTermination(updateExecutor); ExecutorUtil.shutdownAndAwaitTermination(recoveryExecutor); } catch (Exception e) { SolrException.log(log, e);