Skip to content

Commit 6f5a413

Browse files
authored
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.
1 parent 50607e0 commit 6f5a413

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lucene/core/src/java/org/apache/lucene/codecs/lucene90/compressing/Lucene90CompressingTermVectorsReader.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,11 @@ public TermVectorsReader clone() {
304304
return new Lucene90CompressingTermVectorsReader(this);
305305
}
306306

307+
@Override
308+
public TermVectorsReader getMergeInstance() {
309+
return new Lucene90CompressingTermVectorsReader(this);
310+
}
311+
307312
private static RandomAccessInput slice(IndexInput in) throws IOException {
308313
final int length = in.readVInt();
309314
final byte[] bytes = new byte[length];

0 commit comments

Comments
 (0)