SOLR-3721: Fix bug that could allow multiple recoveries to run briefly at the same time if the recovery thread join call was interrupted.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1378904 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-08-30 12:19:10 +00:00
parent 883323f166
commit 48ae881287
2 changed files with 12 additions and 4 deletions

View File

@ -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
----------------------

View File

@ -242,10 +242,14 @@ public final class DefaultSolrCoreState extends SolrCoreState {
synchronized (recoveryLock) {
if (recoveryStrat != null) {
recoveryStrat.close();
while (true) {
try {
recoveryStrat.join();
} catch (InterruptedException e) {
// not interruptible - keep waiting
continue;
}
break;
}
recoveryRunning = false;