SOLR-9470: Index replication interactions with IndexWriter can cause deadlock.

This commit is contained in:
markrmiller 2016-10-06 11:31:30 -04:00
parent 739c0a7bf2
commit 82440f307a
2 changed files with 7 additions and 1 deletions

View File

@ -125,6 +125,8 @@ Bug Fixes
at a node before its local state had updated with the new collection data
(Alan Woodward)
* SOLR-9470: Index replication interactions with IndexWriter can cause deadlock. (Xunlong via Mark Miller)
Optimizations
----------------------

View File

@ -422,11 +422,15 @@ public class IndexFetcher {
} finally {
writer.decref();
}
solrCore.getUpdateHandler().getSolrCoreState().closeIndexWriter(solrCore, true);
}
boolean reloadCore = false;
try {
// we have to be careful and do this after we know isFullCopyNeeded won't be flipped
if (!isFullCopyNeeded) {
solrCore.getUpdateHandler().getSolrCoreState().closeIndexWriter(solrCore, true);
}
LOG.info("Starting download (fullCopy={}) to {}", isFullCopyNeeded, tmpIndexDir);
successfulInstall = false;