mirror of https://github.com/apache/lucene.git
SOLR-6002: CLOSE_LOCK does not need to be static, waitForMerges when DirectUpdateHandler2 closes the IndexWriter, add Greg to CHANGES entry.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1589327 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
678758ae57
commit
b74b88a823
|
@ -119,7 +119,7 @@ Bug Fixes
|
|||
|
||||
* SOLR-6002: Fix a couple of ugly issues around SolrIndexWriter close and
|
||||
rollback as well as how SolrIndexWriter manages it's ref counted directory
|
||||
instance. (Mark Miller)
|
||||
instance. (Mark Miller, Gregory Chanan)
|
||||
|
||||
Other Changes
|
||||
---------------------
|
||||
|
|
|
@ -786,7 +786,13 @@ public class DirectUpdateHandler2 extends UpdateHandler implements SolrCoreState
|
|||
}
|
||||
}
|
||||
|
||||
if (writer != null) writer.close();
|
||||
if (writer != null) {
|
||||
try {
|
||||
writer.waitForMerges();
|
||||
} finally {
|
||||
writer.close();
|
||||
}
|
||||
}
|
||||
|
||||
} finally {
|
||||
solrCoreState.getCommitLock().unlock();
|
||||
|
|
|
@ -49,7 +49,7 @@ public class SolrIndexWriter extends IndexWriter {
|
|||
* System.currentTimeMillis() when commit was called. */
|
||||
public static final String COMMIT_TIME_MSEC_KEY = "commitTimeMSec";
|
||||
|
||||
private static final Object CLOSE_LOCK = new Object();
|
||||
private final Object CLOSE_LOCK = new Object();
|
||||
|
||||
String name;
|
||||
private DirectoryFactory directoryFactory;
|
||||
|
|
Loading…
Reference in New Issue