From 5b7793da519e77f4f5e404ec3edc3dfba7ab4d46 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 19 May 2011 21:12:54 +0000 Subject: [PATCH] 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 --- lucene/src/java/org/apache/lucene/index/SegmentMerger.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lucene/src/java/org/apache/lucene/index/SegmentMerger.java b/lucene/src/java/org/apache/lucene/index/SegmentMerger.java index cba9bd4329c..c2f25fb006e 100644 --- a/lucene/src/java/org/apache/lucene/index/SegmentMerger.java +++ b/lucene/src/java/org/apache/lucene/index/SegmentMerger.java @@ -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(); } }