mirror of https://github.com/apache/lucene.git
SOLR-3844: SolrCore reload can fail because it tries to remove the index write lock while already holding it.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1385135 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
922c7316d8
commit
d8385729c2
|
@ -222,6 +222,9 @@ Bug Fixes
|
|||
(maxOptimizeSegments, softCommit, expungeDeletes) when sending a commit to
|
||||
replicas. (Andy Laird, Tomas Fernandez Lobbe, Mark Miller)
|
||||
|
||||
* SOLR-3844: SolrCore reload can fail because it tries to remove the index
|
||||
write lock while already holding it. (Mark Miller)
|
||||
|
||||
Other Changes
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -410,7 +410,7 @@ public final class SolrCore implements SolrInfoMBean {
|
|||
// protect via synchronized(SolrCore.class)
|
||||
private static Set<String> dirs = new HashSet<String>();
|
||||
|
||||
void initIndex() {
|
||||
void initIndex(boolean reload) {
|
||||
try {
|
||||
String indexDir = getNewIndexDir();
|
||||
boolean indexExists = getDirectoryFactory().exists(indexDir);
|
||||
|
@ -422,7 +422,7 @@ public final class SolrCore implements SolrInfoMBean {
|
|||
|
||||
initIndexReaderFactory();
|
||||
|
||||
if (indexExists && firstTime) {
|
||||
if (indexExists && firstTime && !reload) {
|
||||
// to remove locks, the directory must already exist... so we create it
|
||||
// if it didn't exist already...
|
||||
Directory dir = directoryFactory.get(indexDir, getSolrConfig().indexConfig.lockType);
|
||||
|
@ -644,7 +644,7 @@ public final class SolrCore implements SolrInfoMBean {
|
|||
this.isReloaded = true;
|
||||
}
|
||||
|
||||
initIndex();
|
||||
initIndex(prev != null);
|
||||
|
||||
initWriters();
|
||||
initQParsers();
|
||||
|
|
Loading…
Reference in New Issue