Apache Lucene open-source search software
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.
markrmiller9d8a2faf1864
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 7087d28d30c..ccd539fa9af 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -136,6 +136,8 @@ New Featuresnumeric, and conditional evaluators. BooleanOperations have been removed in preference ofBooleanEvaluators. (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.javaindex 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);