mirror of https://github.com/apache/lucene.git
LUCENE-9935: Clone term vectors reader for merges (#182)
The newly added assertion in the bulk-merge logic doesn't always hold because we do not create a new instance of Lucene90CompressingTermVectorsReader for merges and that reader can be accessed in tests (as long as it happens on the same thread). This change clones a new term vectors reader for merges.
This commit is contained in:
parent
50607e0fb9
commit
6f5a413ec6
|
@ -304,6 +304,11 @@ public final class Lucene90CompressingTermVectorsReader extends TermVectorsReade
|
|||
return new Lucene90CompressingTermVectorsReader(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TermVectorsReader getMergeInstance() {
|
||||
return new Lucene90CompressingTermVectorsReader(this);
|
||||
}
|
||||
|
||||
private static RandomAccessInput slice(IndexInput in) throws IOException {
|
||||
final int length = in.readVInt();
|
||||
final byte[] bytes = new byte[length];
|
||||
|
|
Loading…
Reference in New Issue