mirror of https://github.com/apache/lucene.git
LUCENE-3125: SegmentMerger was closing in-use DocValues after merge
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/docvalues@1125108 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a19d849e2f
commit
5b7793da51
|
@ -575,15 +575,12 @@ final class SegmentMerger {
|
|||
mergeState.multiDeletedDocs = new MultiBits(perDocBits, perDocBitsStarts);
|
||||
final PerDocConsumer docsConsumer = codec
|
||||
.docsConsumer(new PerDocWriteState(segmentWriteState));
|
||||
MultiPerDocValues multiPerDocValues = null;
|
||||
try {
|
||||
multiPerDocValues = new MultiPerDocValues(perDocProducers
|
||||
final MultiPerDocValues multiPerDocValues = new MultiPerDocValues(perDocProducers
|
||||
.toArray(PerDocValues.EMPTY_ARRAY), perDocSlices
|
||||
.toArray(ReaderUtil.Slice.EMPTY_ARRAY));
|
||||
docsConsumer.merge(mergeState, multiPerDocValues);
|
||||
} finally {
|
||||
if (multiPerDocValues != null)
|
||||
multiPerDocValues.close();
|
||||
docsConsumer.close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue