Skip to content

Commit eb572d4

Browse files
Merge branch 'main' into master-node-disconnect
2 parents 2a541b0 + 5142d3d commit eb572d4

File tree

1,317 files changed

+39757
-18170
lines changed

Some content is hidden

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

1,317 files changed

+39757
-18170
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"

.github/workflows/docs-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
uses: elastic/docs-builder/.github/workflows/preview-build.yml@main
1313
with:
1414
path-pattern: docs/**
15+
path-pattern-ignore: docs/changelog/**/*.yaml
1516
permissions:
1617
deployments: write
1718
id-token: write

.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: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
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.util.VectorUtil;
12+
import org.apache.lucene.util.quantization.OptimizedScalarQuantizer;
13+
import org.elasticsearch.common.logging.LogConfigurator;
14+
import org.elasticsearch.simdvec.ESVectorUtil;
15+
import org.openjdk.jmh.annotations.Benchmark;
16+
import org.openjdk.jmh.annotations.BenchmarkMode;
17+
import org.openjdk.jmh.annotations.Fork;
18+
import org.openjdk.jmh.annotations.Measurement;
19+
import org.openjdk.jmh.annotations.Mode;
20+
import org.openjdk.jmh.annotations.OutputTimeUnit;
21+
import org.openjdk.jmh.annotations.Param;
22+
import org.openjdk.jmh.annotations.Scope;
23+
import org.openjdk.jmh.annotations.Setup;
24+
import org.openjdk.jmh.annotations.State;
25+
import org.openjdk.jmh.annotations.Warmup;
26+
import org.openjdk.jmh.infra.Blackhole;
27+
28+
import java.io.IOException;
29+
import java.util.Random;
30+
import java.util.concurrent.TimeUnit;
31+
32+
@BenchmarkMode(Mode.Throughput)
33+
@OutputTimeUnit(TimeUnit.MILLISECONDS)
34+
@State(Scope.Benchmark)
35+
// first iteration is complete garbage, so make sure we really warmup
36+
@Warmup(iterations = 4, time = 1)
37+
// real iterations. not useful to spend tons of time here, better to fork more
38+
@Measurement(iterations = 5, time = 1)
39+
// engage some noise reduction
40+
@Fork(value = 1)
41+
public class DistanceBulkBenchmark {
42+
43+
static {
44+
LogConfigurator.configureESLogging(); // native access requires logging to be initialized
45+
}
46+
47+
@Param({ "384", "782", "1024" })
48+
int dims;
49+
50+
int length;
51+
52+
int numVectors = 4 * 100;
53+
int numQueries = 10;
54+
55+
float[][] vectors;
56+
float[][] queries;
57+
float[] distances = new float[4];
58+
59+
@Setup
60+
public void setup() throws IOException {
61+
Random random = new Random(123);
62+
63+
this.length = OptimizedScalarQuantizer.discretize(dims, 64) / 8;
64+
65+
vectors = new float[numVectors][dims];
66+
for (float[] vector : vectors) {
67+
for (int i = 0; i < dims; i++) {
68+
vector[i] = random.nextFloat();
69+
}
70+
}
71+
72+
queries = new float[numQueries][dims];
73+
for (float[] query : queries) {
74+
for (int i = 0; i < dims; i++) {
75+
query[i] = random.nextFloat();
76+
}
77+
}
78+
}
79+
80+
@Benchmark
81+
@Fork(jvmArgsPrepend = { "--add-modules=jdk.incubator.vector" })
82+
public void squareDistance(Blackhole bh) {
83+
for (int j = 0; j < numQueries; j++) {
84+
float[] query = queries[j];
85+
for (int i = 0; i < numVectors; i++) {
86+
float[] vector = vectors[i];
87+
float distance = VectorUtil.squareDistance(query, vector);
88+
bh.consume(distance);
89+
}
90+
}
91+
}
92+
93+
@Benchmark
94+
@Fork(jvmArgsPrepend = { "--add-modules=jdk.incubator.vector" })
95+
public void soarDistance(Blackhole bh) {
96+
for (int j = 0; j < numQueries; j++) {
97+
float[] query = queries[j];
98+
for (int i = 0; i < numVectors; i++) {
99+
float[] vector = vectors[i];
100+
float distance = ESVectorUtil.soarDistance(query, vector, vector, 1.0f, 1.0f);
101+
bh.consume(distance);
102+
}
103+
}
104+
}
105+
106+
@Benchmark
107+
@Fork(jvmArgsPrepend = { "--add-modules=jdk.incubator.vector" })
108+
public void squareDistanceBulk(Blackhole bh) {
109+
for (int j = 0; j < numQueries; j++) {
110+
float[] query = queries[j];
111+
for (int i = 0; i < numVectors; i += 4) {
112+
ESVectorUtil.squareDistanceBulk(query, vectors[i], vectors[i + 1], vectors[i + 2], vectors[i + 3], distances);
113+
for (float distance : distances) {
114+
bh.consume(distance);
115+
}
116+
117+
}
118+
}
119+
}
120+
121+
@Benchmark
122+
@Fork(jvmArgsPrepend = { "--add-modules=jdk.incubator.vector" })
123+
public void soarDistanceBulk(Blackhole bh) {
124+
for (int j = 0; j < numQueries; j++) {
125+
float[] query = queries[j];
126+
for (int i = 0; i < numVectors; i += 4) {
127+
ESVectorUtil.soarDistanceBulk(
128+
query,
129+
vectors[i],
130+
vectors[i + 1],
131+
vectors[i + 2],
132+
vectors[i + 3],
133+
vectors[i],
134+
1.0f,
135+
1.0f,
136+
distances
137+
);
138+
for (float distance : distances) {
139+
bh.consume(distance);
140+
}
141+
142+
}
143+
}
144+
}
145+
}

0 commit comments

Comments
 (0)