Apache Lucene open-source search software
SOLR-3721: Fix bug that could allow multiple recoveries to run briefly at the same time if the recovery thread join call was interrupted.
Mark Robert Miller48ae88128766
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex 134374951db..5e3939f4388 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -90,6 +90,10 @@ Bug Fixes* SOLR-3770: Overseer may lose updates to cluster state (siren)+* SOLR-3721: Fix bug that could allow multiple recoveries to run briefly at+ the same time if the recovery thread join call was interrupted.+ (Per Steffensen, Mark Miller)+Other Changes----------------------diff --git a/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java b/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.javaindex 6a53ed5e763..174e0d34114 100644--- a/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java+++ b/solr/core/src/java/org/apache/solr/update/DefaultSolrCoreState.java@@ -242,10 +242,14 @@ public final class DefaultSolrCoreState extends SolrCoreState {synchronized (recoveryLock) {if (recoveryStrat != null) {recoveryStrat.close();- try {- recoveryStrat.join();- } catch (InterruptedException e) {-+ while (true) {+ try {+ recoveryStrat.join();+ } catch (InterruptedException e) {+ // not interruptible - keep waiting+ continue;+ }+ break;}recoveryRunning = false;