mirror of https://github.com/apache/lucene.git
LUCENE-5656: don't leak dv producers if one of them throws exception
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1593238 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8806d866fc
commit
90c582d84e
|
@ -187,13 +187,12 @@ public final class SegmentReader extends AtomicReader {
|
|||
Long gen = e.getKey();
|
||||
List<FieldInfo> infos = e.getValue();
|
||||
DocValuesProducer dvp = segDocValues.getDocValuesProducer(gen, si, IOContext.READ, dir, dvFormat, infos);
|
||||
dvGens.add(gen);
|
||||
for (FieldInfo fi : infos) {
|
||||
dvProducersByField.put(fi.name, dvp);
|
||||
}
|
||||
dvProducers.add(dvp);
|
||||
}
|
||||
|
||||
dvGens.addAll(genInfos.keySet());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue