Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to new Lucene snapshot #87932

Merged
merged 4 commits into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build-tools-internal/version.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
elasticsearch = 8.4.0
lucene = 9.2.0
lucene = 9.3.0-snapshot-f3025a56e31

bundled_jdk_vendor = openjdk
bundled_jdk = 18.0.1.1+2@65ae32619e2f40f3a9af3af1851d6e19
Expand Down
4 changes: 2 additions & 2 deletions docs/Versions.asciidoc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

include::{docs-root}/shared/versions/stack/{source_branch}.asciidoc[]

:lucene_version: 9.2.0
:lucene_version_path: 9_2_0
:lucene_version: 9.3.0
:lucene_version_path: 9_3_0
:jdk: 11.0.2
:jdk_major: 11
:build_type: tar
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
edcd74ce93bda0e2007428dc989f0d855449e154

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6f4e079ad40b708b1b7cd6f41300e6bdb71ade94

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6dd3dedd93129e518eaccd806cd16b067f27d414

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d510d06738c5e0db79875bb07699bf3acc3b31cc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
57e329682ef82a15901c76e5fdbc5ee233689f2d

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bd19c2df3970762d730e79a57398010d4dac3ea9

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4b59d393f25bed87d0d8df0f851e0c7d07960d23

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e9aaeb24bcdaf0f9da2a1f8500511ecb56306223

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d3bba726a5b29eae4dfba27e1e65fdd6a1f4cc2f

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5a161d98f65f6d5b0aa5bd881c37d3054db89b09

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f148a80992ae25e893b8959efd818cbb0d3e2121
1 change: 0 additions & 1 deletion server/licenses/lucene-analysis-common-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f8fb2da223a48e2f54a5c94924850b007e5a1f57
1 change: 0 additions & 1 deletion server/licenses/lucene-backward-codecs-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
48b0e121903b227a8730d23ef56879ce04cdfedf
1 change: 0 additions & 1 deletion server/licenses/lucene-core-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
690ea3dcc4606a4599b3e2b2e3510cff7059950c
1 change: 0 additions & 1 deletion server/licenses/lucene-grouping-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
32cdfad19d7bbdc7f3052bf6c9d9871263cfd1c8
1 change: 0 additions & 1 deletion server/licenses/lucene-highlighter-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
366231787c733fc0c4fb373eaf507a66ba339dd6
1 change: 0 additions & 1 deletion server/licenses/lucene-join-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
08837eab0f0836bba2f82827acc3eab3006b16b9
1 change: 0 additions & 1 deletion server/licenses/lucene-memory-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bc550835d4a040f858f88f845dcb66573ca3c19e
1 change: 0 additions & 1 deletion server/licenses/lucene-misc-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
506d4ddd2ac3386df063f279113006694889ae53
1 change: 0 additions & 1 deletion server/licenses/lucene-queries-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1aa664e0ac15d7d12723674d4b65d8969be9f8c2
1 change: 0 additions & 1 deletion server/licenses/lucene-queryparser-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6350f41cb9117e4499c15bd060ec2cf7b48970d9
1 change: 0 additions & 1 deletion server/licenses/lucene-sandbox-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b36d0d959d2decffe5f9ea68130f28470637ca5c
1 change: 0 additions & 1 deletion server/licenses/lucene-suggest-9.2.0.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b0220d2ce0e68879535246013601a09323106875
2 changes: 1 addition & 1 deletion server/src/main/java/org/elasticsearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public class Version implements Comparable<Version>, ToXContentFragment {
public static final Version V_8_2_3 = new Version(8_02_03_99, org.apache.lucene.util.Version.LUCENE_9_1_0);
public static final Version V_8_2_4 = new Version(8_02_04_99, org.apache.lucene.util.Version.LUCENE_9_1_0);
public static final Version V_8_3_0 = new Version(8_03_00_99, org.apache.lucene.util.Version.LUCENE_9_2_0);
public static final Version V_8_4_0 = new Version(8_04_00_99, org.apache.lucene.util.Version.LUCENE_9_2_0);
public static final Version V_8_4_0 = new Version(8_04_00_99, org.apache.lucene.util.Version.LUCENE_9_3_0);
public static final Version CURRENT = V_8_4_0;

private static final Map<Integer, Version> idToVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2408,6 +2408,8 @@ private IndexWriterConfig getIndexWriterConfig() {
mergePolicy = new ShuffleForcedMergePolicy(mergePolicy);
}
iwc.setMergePolicy(mergePolicy);
// TODO: Introduce an index setting for setMaxFullFlushMergeWaitMillis
iwc.setMaxFullFlushMergeWaitMillis(-1);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We disable merges on refresh here.

iwc.setSimilarity(engineConfig.getSimilarity());
iwc.setRAMBufferSizeMB(engineConfig.getIndexingBufferSize().getMbFrac());
iwc.setCodec(engineConfig.getCodec());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public long nextOrd() throws IOException {
}

@Override
public long docValueCount() {
public int docValueCount() {
return values.docValueCount();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ public long nextOrd() throws IOException {
}

@Override
public long docValueCount() {
return currentEndOffset - currentOffset;
public int docValueCount() {
return Math.toIntExact(currentEndOffset - currentOffset);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public long nextOrd() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return values.size();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public long nextOrd() throws IOException {
}

@Override
public long docValueCount() {
public int docValueCount() {
return delegate.docValueCount();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public long nextOrd() throws IOException {
}

@Override
public long docValueCount() {
public int docValueCount() {
return values.docValueCount();
}

Expand Down Expand Up @@ -319,7 +319,7 @@ public BytesRef lookupOrd(long ord) throws IOException {
}

@Override
public long docValueCount() {
public int docValueCount() {
return values.docValueCount();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,9 @@ public void testWrapAllDocsLive() throws Exception {
public void testWrapLiveDocsNotExposeAbortedDocuments() throws Exception {
Directory dir = newDirectory();
IndexWriterConfig config = newIndexWriterConfig().setSoftDeletesField(Lucene.SOFT_DELETES_FIELD)
.setMergePolicy(new SoftDeletesRetentionMergePolicy(Lucene.SOFT_DELETES_FIELD, MatchAllDocsQuery::new, newMergePolicy()));
.setMergePolicy(new SoftDeletesRetentionMergePolicy(Lucene.SOFT_DELETES_FIELD, MatchAllDocsQuery::new, newMergePolicy()))
// disable merges on refresh as we will verify the deleted documents
.setMaxFullFlushMergeWaitMillis(-1);
IndexWriter writer = new IndexWriter(dir, config);
int numDocs = between(1, 10);
List<String> liveDocs = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public long nextOrd() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return documentOrds.length;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ public long nextOrd() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return array[doc].length;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public long nextOrd() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return ords.length;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public long nextOrd() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public long nextOrd() {
}

@Override
public long docValueCount() {
public int docValueCount() {
return ords[doc].length;
}
};
Expand Down Expand Up @@ -232,7 +232,7 @@ public long nextOrd() throws IOException {
}

@Override
public long docValueCount() {
public int docValueCount() {
throw new UnsupportedOperationException();
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
57e329682ef82a15901c76e5fdbc5ee233689f2d
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ protected LegacySortedSetDocValues() {}
*/
public abstract long nextOrd();

/**
* Retrieves the number of unique ords for the current document. This must always be greater than
* zero. It is illegal to call this method after advanceExact(int) returned {@code false}.
*/
public abstract int docValueCount();

/**
* Sets iteration to the specified docID
* @param docID document ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ public long nextOrd() {
}

@Override
public long docValueCount() {
throw new UnsupportedOperationException();
public int docValueCount() {
return values.docValueCount();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,11 @@ public BytesRef lookupOrd(long ord) {
return binary.get(ord);
}

@Override
public int docValueCount() {
return Math.toIntExact(endOffset - startOffset);
}

@Override
public long getValueCount() {
return valueCount;
Expand Down Expand Up @@ -1415,6 +1420,11 @@ public long getValueCount() {
return valueCount;
}

@Override
public int docValueCount() {
return Math.toIntExact(endOffset - startOffset);
}

@Override
public long lookupTerm(BytesRef key) {
if (binary instanceof CompressedBinaryDocValues) {
Expand Down