mirror of https://github.com/apache/lucene.git
LUCENE-6205: don't let doc values updates write in one thread at the same time as a merge kicking off in another
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1655426 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
06287f52ad
commit
9d5d43ff86
|
@ -471,6 +471,10 @@ Bug Fixes
|
|||
* LUCENE-6173: NumericTermAttribute and spatial/CellTokenStream do not clone
|
||||
their BytesRef(Builder)s. Also equals/hashCode was missing. (Uwe Schindler)
|
||||
|
||||
* LUCENE-6205: Fixed intermittent concurrency issue that could cause
|
||||
FileNotFoundException when writing doc values updates at the same
|
||||
time that a merge kicks off. (Mike McCandless)
|
||||
|
||||
Documentation
|
||||
|
||||
* LUCENE-5392: Add/improve analysis package documentation to reflect
|
||||
|
|
|
@ -3927,7 +3927,14 @@ public class IndexWriter implements Closeable, TwoPhaseCommit, Accountable {
|
|||
// fix the reader's live docs and del count
|
||||
assert delCount > reader.numDeletedDocs(); // beware of zombies
|
||||
|
||||
SegmentReader newReader = new SegmentReader(info, reader, liveDocs, info.info.getDocCount() - delCount);
|
||||
SegmentReader newReader;
|
||||
|
||||
synchronized (this) {
|
||||
// We must also sync on IW here, because another thread could be writing
|
||||
// new DV updates / remove old gen field infos files causing FNFE:
|
||||
newReader = new SegmentReader(info, reader, liveDocs, info.info.getDocCount() - delCount);
|
||||
}
|
||||
|
||||
boolean released = false;
|
||||
try {
|
||||
rld.release(reader);
|
||||
|
|
Loading…
Reference in New Issue