You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dn...@apache.org on 2021/06/15 11:10:38 UTC
[lucene] branch main updated: LUCENE-9935: Clone term vectors
reader for merges (#182)
This is an automated email from the ASF dual-hosted git repository.
dnhatn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/main by this push:
new 6f5a413 LUCENE-9935: Clone term vectors reader for merges (#182)
6f5a413 is described below
commit 6f5a413ec6260c243a8907cdd667545bd1a079e5
Author: Nhat Nguyen <nh...@elastic.co>
AuthorDate: Tue Jun 15 07:10:30 2021 -0400
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.
---
.../lucene90/compressing/Lucene90CompressingTermVectorsReader.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/compressing/Lucene90CompressingTermVectorsReader.java b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/compressing/Lucene90CompressingTermVectorsReader.java
index 7330f2d..b44c1cd 100644
--- a/lucene/core/src/java/org/apache/lucene/codecs/lucene90/compressing/Lucene90CompressingTermVectorsReader.java
+++ b/lucene/core/src/java/org/apache/lucene/codecs/lucene90/compressing/Lucene90CompressingTermVectorsReader.java
@@ -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];