Skip to content

Commit 08aec70

Browse files
committed
Merge remote-tracking branch 'upstream/main' into index-templates-tracking
* upstream/main: (166 commits) Reduce inactive sink interval in VectorSimilarityFunctionsIT (elastic#132288) ESQL: Allow agg tests to process many columns (elastic#132358) Update analysis-lowercase-tokenfilter.md (elastic#132359) Add Sparse Vector Index Options Settings to Semantic Text Field (elastic#131058) Collect node thread pool usage for shard balancing (elastic#131480) Add tasks to validate new style transport versions (elastic#131782) Mute org.elasticsearch.search.routing.SearchReplicaSelectionIT testNodeSelection elastic#132354 Mute org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryIT testBadAsyncId elastic#132353 Fixes DenseVectorFieldIndexTypeUpdateIT release tests (elastic#132346) Fix testCloseOrReallocateDuringPartialSnapshot (elastic#132049) (Doc) ILM Force Merge not on HDD and happens on hosting node not current phase tier (elastic#130280) Run GeoIp YAML tests in multi-project cluster and fix bug discovered by tests (elastic#131521) Unmutes elastic#132111, seems a transient, non reproducible issue (elastic#132253) Mute org.elasticsearch.search.suggest.phrase.PhraseSuggesterIT testPhraseSuggestionWithNgramOnlyAnalyzerThrowsException elastic#132347 Add AI21 support to Inference Plugin (elastic#131238) OpenJDK EA builds should use https instead of http (elastic#132297) ESQL: Normalize timeseries aggs slightly (elastic#132284) Avoid internal server error on suggester ngram bad request (elastic#132321) [ES|QL] Rerank operator improvements (elastic#132318) Mute org.elasticsearch.xpack.logsdb.qa.LogsDbVersusReindexedLogsDbChallengeRestIT testTermsQuery elastic#132337 ...
2 parents e995658 + 6ca5a18 commit 08aec70

File tree

920 files changed

+17663
-9595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

920 files changed

+17663
-9595
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ steps:
6565
timeout_in_minutes: 300
6666
matrix:
6767
setup:
68-
BWC_VERSION: ["8.17.10", "8.18.5", "8.19.0", "9.0.5", "9.1.0", "9.2.0"]
68+
BWC_VERSION: ["8.17.10", "8.18.5", "8.19.1", "9.0.5", "9.1.1", "9.2.0"]
6969
agents:
7070
provider: gcp
7171
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ steps:
334334
env:
335335
BWC_VERSION: 8.18.5
336336

337-
- label: "{{matrix.image}} / 8.19.0 / packaging-tests-upgrade"
338-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.19.0
337+
- label: "{{matrix.image}} / 8.19.1 / packaging-tests-upgrade"
338+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.19.1
339339
timeout_in_minutes: 300
340340
matrix:
341341
setup:
@@ -348,7 +348,7 @@ steps:
348348
machineType: custom-16-32768
349349
buildDirectory: /dev/shm/bk
350350
env:
351-
BWC_VERSION: 8.19.0
351+
BWC_VERSION: 8.19.1
352352

353353
- label: "{{matrix.image}} / 9.0.5 / packaging-tests-upgrade"
354354
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.5
@@ -366,8 +366,8 @@ steps:
366366
env:
367367
BWC_VERSION: 9.0.5
368368

369-
- label: "{{matrix.image}} / 9.1.0 / packaging-tests-upgrade"
370-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.0
369+
- label: "{{matrix.image}} / 9.1.1 / packaging-tests-upgrade"
370+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.1
371371
timeout_in_minutes: 300
372372
matrix:
373373
setup:
@@ -380,7 +380,7 @@ steps:
380380
machineType: custom-16-32768
381381
buildDirectory: /dev/shm/bk
382382
env:
383-
BWC_VERSION: 9.1.0
383+
BWC_VERSION: 9.1.1
384384

385385
- label: "{{matrix.image}} / 9.2.0 / packaging-tests-upgrade"
386386
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.2.0

.buildkite/pipelines/periodic.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ steps:
363363
- signal_reason: agent_stop
364364
limit: 3
365365

366-
- label: 8.19.0 / bwc
367-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.19.0#bwcTest
366+
- label: 8.19.1 / bwc
367+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.19.1#bwcTest
368368
timeout_in_minutes: 300
369369
agents:
370370
provider: gcp
@@ -373,7 +373,7 @@ steps:
373373
buildDirectory: /dev/shm/bk
374374
preemptible: true
375375
env:
376-
BWC_VERSION: 8.19.0
376+
BWC_VERSION: 8.19.1
377377
retry:
378378
automatic:
379379
- exit_status: "-1"
@@ -401,8 +401,8 @@ steps:
401401
- signal_reason: agent_stop
402402
limit: 3
403403

404-
- label: 9.1.0 / bwc
405-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.0#bwcTest
404+
- label: 9.1.1 / bwc
405+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.1#bwcTest
406406
timeout_in_minutes: 300
407407
agents:
408408
provider: gcp
@@ -411,7 +411,7 @@ steps:
411411
buildDirectory: /dev/shm/bk
412412
preemptible: true
413413
env:
414-
BWC_VERSION: 9.1.0
414+
BWC_VERSION: 9.1.1
415415
retry:
416416
automatic:
417417
- exit_status: "-1"
@@ -506,7 +506,7 @@ steps:
506506
setup:
507507
ES_RUNTIME_JAVA:
508508
- openjdk21
509-
BWC_VERSION: ["8.17.10", "8.18.5", "8.19.0", "9.0.5", "9.1.0", "9.2.0"]
509+
BWC_VERSION: ["8.17.10", "8.18.5", "8.19.1", "9.0.5", "9.1.1", "9.2.0"]
510510
agents:
511511
provider: gcp
512512
image: family/elasticsearch-ubuntu-2404
@@ -550,7 +550,7 @@ steps:
550550
ES_RUNTIME_JAVA:
551551
- openjdk21
552552
- openjdk23
553-
BWC_VERSION: ["8.17.10", "8.18.5", "8.19.0", "9.0.5", "9.1.0", "9.2.0"]
553+
BWC_VERSION: ["8.17.10", "8.18.5", "8.19.1", "9.0.5", "9.1.1", "9.2.0"]
554554
agents:
555555
provider: gcp
556556
image: family/elasticsearch-ubuntu-2404

.ci/bwcVersions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ BWC_VERSION:
1818
- "8.16.6"
1919
- "8.17.10"
2020
- "8.18.5"
21-
- "8.19.0"
21+
- "8.19.1"
2222
- "9.0.5"
23-
- "9.1.0"
23+
- "9.1.1"
2424
- "9.2.0"

.ci/snapshotBwcVersions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BWC_VERSION:
22
- "8.17.10"
33
- "8.18.5"
4-
- "8.19.0"
4+
- "8.19.1"
55
- "9.0.5"
6-
- "9.1.0"
6+
- "9.1.1"
77
- "9.2.0"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ testfixtures_shared/
6969
# Generated
7070
checkstyle_ide.xml
7171
x-pack/plugin/esql/src/main/generated-src/generated/
72+
server/src/main/resources/transport/defined/manifest.txt
7273

7374
# JEnv
7475
.java-version
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
package org.elasticsearch.benchmark.vector;
10+
11+
import org.apache.lucene.index.VectorSimilarityFunction;
12+
import org.apache.lucene.store.Directory;
13+
import org.apache.lucene.store.IOContext;
14+
import org.apache.lucene.store.IndexInput;
15+
import org.apache.lucene.store.IndexOutput;
16+
import org.apache.lucene.store.MMapDirectory;
17+
import org.apache.lucene.util.quantization.OptimizedScalarQuantizer;
18+
import org.elasticsearch.common.logging.LogConfigurator;
19+
import org.elasticsearch.core.IOUtils;
20+
import org.elasticsearch.simdvec.ES91Int4VectorsScorer;
21+
import org.elasticsearch.simdvec.ES92Int7VectorsScorer;
22+
import org.elasticsearch.simdvec.internal.vectorization.ESVectorizationProvider;
23+
import org.openjdk.jmh.annotations.Benchmark;
24+
import org.openjdk.jmh.annotations.BenchmarkMode;
25+
import org.openjdk.jmh.annotations.Fork;
26+
import org.openjdk.jmh.annotations.Measurement;
27+
import org.openjdk.jmh.annotations.Mode;
28+
import org.openjdk.jmh.annotations.OutputTimeUnit;
29+
import org.openjdk.jmh.annotations.Param;
30+
import org.openjdk.jmh.annotations.Scope;
31+
import org.openjdk.jmh.annotations.Setup;
32+
import org.openjdk.jmh.annotations.State;
33+
import org.openjdk.jmh.annotations.TearDown;
34+
import org.openjdk.jmh.annotations.Warmup;
35+
import org.openjdk.jmh.infra.Blackhole;
36+
37+
import java.io.IOException;
38+
import java.nio.file.Files;
39+
import java.util.concurrent.ThreadLocalRandom;
40+
import java.util.concurrent.TimeUnit;
41+
42+
@BenchmarkMode(Mode.Throughput)
43+
@OutputTimeUnit(TimeUnit.MILLISECONDS)
44+
@State(Scope.Benchmark)
45+
// first iteration is complete garbage, so make sure we really warmup
46+
@Warmup(iterations = 4, time = 1)
47+
// real iterations. not useful to spend tons of time here, better to fork more
48+
@Measurement(iterations = 5, time = 1)
49+
// engage some noise reduction
50+
@Fork(value = 1)
51+
public class Int7ScorerBenchmark {
52+
53+
static {
54+
LogConfigurator.configureESLogging(); // native access requires logging to be initialized
55+
}
56+
57+
@Param({ "384", "782", "1024" })
58+
int dims;
59+
60+
int numVectors = 20 * ES92Int7VectorsScorer.BULK_SIZE;
61+
int numQueries = 5;
62+
63+
byte[] scratch;
64+
byte[][] binaryVectors;
65+
byte[][] binaryQueries;
66+
float[] scores = new float[ES92Int7VectorsScorer.BULK_SIZE];
67+
68+
ES92Int7VectorsScorer scorer;
69+
Directory dir;
70+
IndexInput in;
71+
72+
OptimizedScalarQuantizer.QuantizationResult queryCorrections;
73+
float centroidDp;
74+
75+
@Setup
76+
public void setup() throws IOException {
77+
binaryVectors = new byte[numVectors][dims];
78+
dir = new MMapDirectory(Files.createTempDirectory("vectorData"));
79+
try (IndexOutput out = dir.createOutput("vectors", IOContext.DEFAULT)) {
80+
for (byte[] binaryVector : binaryVectors) {
81+
for (int i = 0; i < dims; i++) {
82+
// 4-bit quantization
83+
binaryVector[i] = (byte) ThreadLocalRandom.current().nextInt(128);
84+
}
85+
out.writeBytes(binaryVector, 0, binaryVector.length);
86+
ThreadLocalRandom.current().nextBytes(binaryVector);
87+
out.writeBytes(binaryVector, 0, 16); // corrections
88+
}
89+
}
90+
91+
queryCorrections = new OptimizedScalarQuantizer.QuantizationResult(
92+
ThreadLocalRandom.current().nextFloat(),
93+
ThreadLocalRandom.current().nextFloat(),
94+
ThreadLocalRandom.current().nextFloat(),
95+
Short.toUnsignedInt((short) ThreadLocalRandom.current().nextInt())
96+
);
97+
centroidDp = ThreadLocalRandom.current().nextFloat();
98+
99+
in = dir.openInput("vectors", IOContext.DEFAULT);
100+
binaryQueries = new byte[numVectors][dims];
101+
for (byte[] binaryVector : binaryVectors) {
102+
for (int i = 0; i < dims; i++) {
103+
// 7-bit quantization
104+
binaryVector[i] = (byte) ThreadLocalRandom.current().nextInt(128);
105+
}
106+
}
107+
108+
scratch = new byte[dims];
109+
scorer = ESVectorizationProvider.getInstance().newES92Int7VectorsScorer(in, dims);
110+
}
111+
112+
@TearDown
113+
public void teardown() throws IOException {
114+
IOUtils.close(dir, in);
115+
}
116+
117+
@Benchmark
118+
@Fork(jvmArgsPrepend = { "--add-modules=jdk.incubator.vector" })
119+
public void scoreFromMemorySegment(Blackhole bh) throws IOException {
120+
for (int j = 0; j < numQueries; j++) {
121+
in.seek(0);
122+
for (int i = 0; i < numVectors; i++) {
123+
bh.consume(
124+
scorer.score(
125+
binaryQueries[j],
126+
queryCorrections.lowerInterval(),
127+
queryCorrections.upperInterval(),
128+
queryCorrections.quantizedComponentSum(),
129+
queryCorrections.additionalCorrection(),
130+
VectorSimilarityFunction.EUCLIDEAN,
131+
centroidDp
132+
)
133+
);
134+
}
135+
}
136+
}
137+
138+
@Benchmark
139+
@Fork(jvmArgsPrepend = { "--add-modules=jdk.incubator.vector" })
140+
public void scoreFromMemorySegmentBulk(Blackhole bh) throws IOException {
141+
for (int j = 0; j < numQueries; j++) {
142+
in.seek(0);
143+
for (int i = 0; i < numVectors; i += ES91Int4VectorsScorer.BULK_SIZE) {
144+
scorer.scoreBulk(
145+
binaryQueries[j],
146+
queryCorrections.lowerInterval(),
147+
queryCorrections.upperInterval(),
148+
queryCorrections.quantizedComponentSum(),
149+
queryCorrections.additionalCorrection(),
150+
VectorSimilarityFunction.EUCLIDEAN,
151+
centroidDp,
152+
scores
153+
);
154+
for (float score : scores) {
155+
bh.consume(score);
156+
}
157+
}
158+
}
159+
}
160+
}

build-tools-internal/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,14 @@ gradlePlugin {
220220
id = 'elasticsearch.internal-yaml-rest-test'
221221
implementationClass = 'org.elasticsearch.gradle.internal.test.rest.InternalYamlRestTestPlugin'
222222
}
223+
transportVersionManagementPlugin {
224+
id = 'elasticsearch.transport-version-management'
225+
implementationClass = 'org.elasticsearch.gradle.internal.transport.TransportVersionManagementPlugin'
226+
}
227+
globalTransportVersionManagementPlugin {
228+
id = 'elasticsearch.global-transport-version-management'
229+
implementationClass = 'org.elasticsearch.gradle.internal.transport.GlobalTransportVersionManagementPlugin'
230+
}
223231
}
224232
}
225233

build-tools-internal/src/integTest/resources/org/elasticsearch/gradle/internal/fake_git/remote/settings.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ rootProject.name = "root"
1212
include ":distribution:bwc:bugfix"
1313
include ":distribution:bwc:bugfix2"
1414
include ":distribution:bwc:bugfix3"
15+
include ":distribution:bwc:bugfix4"
16+
include ":distribution:bwc:bugfix5"
1517
include ":distribution:bwc:minor"
1618
include ":distribution:bwc:major"
1719
include ":distribution:bwc:staged"

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/BaseInternalPluginBuildPlugin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.elasticsearch.gradle.internal.info.BuildParameterExtension;
1616
import org.elasticsearch.gradle.internal.precommit.JarHellPrecommitPlugin;
1717
import org.elasticsearch.gradle.internal.test.ClusterFeaturesMetadataPlugin;
18+
import org.elasticsearch.gradle.internal.transport.TransportVersionManagementPlugin;
1819
import org.elasticsearch.gradle.plugin.PluginBuildPlugin;
1920
import org.elasticsearch.gradle.plugin.PluginPropertiesExtension;
2021
import org.elasticsearch.gradle.util.GradleUtils;
@@ -36,6 +37,7 @@ public void apply(Project project) {
3637
project.getPluginManager().apply(JarHellPrecommitPlugin.class);
3738
project.getPluginManager().apply(ElasticsearchJavaPlugin.class);
3839
project.getPluginManager().apply(ClusterFeaturesMetadataPlugin.class);
40+
project.getPluginManager().apply(TransportVersionManagementPlugin.class);
3941
boolean isCi = project.getRootProject().getExtensions().getByType(BuildParameterExtension.class).getCi();
4042
// Clear default dependencies added by public PluginBuildPlugin as we add our
4143
// own project dependencies for internal builds

0 commit comments

Comments
 (0)