Skip to content

Commit adfb799

Browse files
committed
Merge branch 'main' into lucene_snapshot
2 parents 2a35640 + c51d17f commit adfb799

File tree

588 files changed

+5432
-3201
lines changed

Some content is hidden

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

588 files changed

+5432
-3201
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.19.6", "9.1.6", "9.2.0", "9.3.0"]
68+
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.1", "9.3.0"]
6969
agents:
7070
provider: gcp
7171
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-java-ea.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ steps:
385385
- signal_reason: agent_stop
386386
limit: 3
387387

388-
- label: 9.0.8 / bwc
389-
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.0.8#bwcTest
388+
- label: 9.0.7 / bwc
389+
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.0.7#bwcTest
390390
timeout_in_minutes: 300
391391
agents:
392392
provider: gcp
@@ -395,7 +395,7 @@ steps:
395395
buildDirectory: /dev/shm/bk
396396
preemptible: true
397397
env:
398-
BWC_VERSION: 9.0.8
398+
BWC_VERSION: 9.0.7
399399
retry:
400400
automatic:
401401
- exit_status: "-1"
@@ -423,8 +423,8 @@ steps:
423423
- signal_reason: agent_stop
424424
limit: 3
425425

426-
- label: 9.2.0 / bwc
427-
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.2.0#bwcTest
426+
- label: 9.2.1 / bwc
427+
command: .ci/scripts/run-gradle.sh -Druntime.java=$$JAVA_EA_VERSION -Dbwc.checkout.align=true v9.2.1#bwcTest
428428
timeout_in_minutes: 300
429429
agents:
430430
provider: gcp
@@ -433,7 +433,7 @@ steps:
433433
buildDirectory: /dev/shm/bk
434434
preemptible: true
435435
env:
436-
BWC_VERSION: 9.2.0
436+
BWC_VERSION: 9.2.1
437437
retry:
438438
automatic:
439439
- exit_status: "-1"
@@ -538,7 +538,7 @@ steps:
538538
timeout_in_minutes: 300
539539
matrix:
540540
setup:
541-
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.0", "9.3.0"]
541+
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.1", "9.3.0"]
542542
agents:
543543
provider: gcp
544544
image: family/elasticsearch-ubuntu-2404

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ steps:
350350
env:
351351
BWC_VERSION: 8.19.6
352352

353-
- label: "{{matrix.image}} / 9.0.8 / packaging-tests-upgrade"
354-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.8
353+
- label: "{{matrix.image}} / 9.0.7 / packaging-tests-upgrade"
354+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.0.7
355355
timeout_in_minutes: 300
356356
matrix:
357357
setup:
@@ -364,7 +364,7 @@ steps:
364364
machineType: custom-16-32768
365365
buildDirectory: /dev/shm/bk
366366
env:
367-
BWC_VERSION: 9.0.8
367+
BWC_VERSION: 9.0.7
368368

369369
- label: "{{matrix.image}} / 9.1.6 / packaging-tests-upgrade"
370370
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.6
@@ -382,8 +382,8 @@ steps:
382382
env:
383383
BWC_VERSION: 9.1.6
384384

385-
- label: "{{matrix.image}} / 9.2.0 / packaging-tests-upgrade"
386-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.2.0
385+
- label: "{{matrix.image}} / 9.2.1 / packaging-tests-upgrade"
386+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.2.1
387387
timeout_in_minutes: 300
388388
matrix:
389389
setup:
@@ -396,7 +396,7 @@ steps:
396396
machineType: custom-16-32768
397397
buildDirectory: /dev/shm/bk
398398
env:
399-
BWC_VERSION: 9.2.0
399+
BWC_VERSION: 9.2.1
400400

401401
- label: "{{matrix.image}} / 9.3.0 / packaging-tests-upgrade"
402402
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.3.0

.buildkite/pipelines/periodic.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,8 @@ steps:
382382
- signal_reason: agent_stop
383383
limit: 3
384384

385-
- label: 9.0.8 / bwc
386-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.0.8#bwcTest
385+
- label: 9.0.7 / bwc
386+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.0.7#bwcTest
387387
timeout_in_minutes: 300
388388
agents:
389389
provider: gcp
@@ -392,7 +392,7 @@ steps:
392392
buildDirectory: /dev/shm/bk
393393
preemptible: true
394394
env:
395-
BWC_VERSION: 9.0.8
395+
BWC_VERSION: 9.0.7
396396
retry:
397397
automatic:
398398
- exit_status: "-1"
@@ -420,8 +420,8 @@ steps:
420420
- signal_reason: agent_stop
421421
limit: 3
422422

423-
- label: 9.2.0 / bwc
424-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.2.0#bwcTest
423+
- label: 9.2.1 / bwc
424+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.2.1#bwcTest
425425
timeout_in_minutes: 300
426426
agents:
427427
provider: gcp
@@ -430,7 +430,7 @@ steps:
430430
buildDirectory: /dev/shm/bk
431431
preemptible: true
432432
env:
433-
BWC_VERSION: 9.2.0
433+
BWC_VERSION: 9.2.1
434434
retry:
435435
automatic:
436436
- exit_status: "-1"
@@ -525,7 +525,7 @@ steps:
525525
setup:
526526
ES_RUNTIME_JAVA:
527527
- openjdk21
528-
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.0", "9.3.0"]
528+
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.1", "9.3.0"]
529529
agents:
530530
provider: gcp
531531
image: family/elasticsearch-ubuntu-2404
@@ -569,7 +569,7 @@ steps:
569569
ES_RUNTIME_JAVA:
570570
- openjdk21
571571
- openjdk23
572-
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.0", "9.3.0"]
572+
BWC_VERSION: ["8.19.6", "9.1.6", "9.2.1", "9.3.0"]
573573
agents:
574574
provider: gcp
575575
image: family/elasticsearch-ubuntu-2404

.ci/bwcVersions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BWC_VERSION:
1919
- "8.17.10"
2020
- "8.18.8"
2121
- "8.19.6"
22-
- "9.0.8"
22+
- "9.0.7"
2323
- "9.1.6"
24-
- "9.2.0"
24+
- "9.2.1"
2525
- "9.3.0"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BWC_VERSION:
22
- "8.19.6"
33
- "9.1.6"
4-
- "9.2.0"
4+
- "9.2.1"
55
- "9.3.0"

benchmarks/src/main/java/org/elasticsearch/benchmark/vector/PackAsBinaryBenchmark.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import org.elasticsearch.common.logging.LogConfigurator;
1212
import org.elasticsearch.index.codec.vectors.BQVectorUtils;
13+
import org.elasticsearch.simdvec.ESVectorUtil;
1314
import org.openjdk.jmh.annotations.Benchmark;
1415
import org.openjdk.jmh.annotations.BenchmarkMode;
1516
import org.openjdk.jmh.annotations.Fork;
@@ -70,15 +71,15 @@ public void setup() throws IOException {
7071
@Benchmark
7172
public void packAsBinary(Blackhole bh) {
7273
for (int i = 0; i < numVectors; i++) {
73-
BQVectorUtils.packAsBinary(qVectors[i], packed);
74+
ESVectorUtil.packAsBinary(qVectors[i], packed);
7475
bh.consume(packed);
7576
}
7677
}
7778

7879
@Benchmark
7980
public void packAsBinaryLegacy(Blackhole bh) {
8081
for (int i = 0; i < numVectors; i++) {
81-
BQVectorUtils.packAsBinaryLegacy(qVectors[i], packed);
82+
packAsBinaryLegacy(qVectors[i], packed);
8283
bh.consume(packed);
8384
}
8485
}
@@ -87,8 +88,22 @@ public void packAsBinaryLegacy(Blackhole bh) {
8788
@Fork(jvmArgsPrepend = { "--add-modules=jdk.incubator.vector" })
8889
public void packAsBinaryPanama(Blackhole bh) {
8990
for (int i = 0; i < numVectors; i++) {
90-
BQVectorUtils.packAsBinary(qVectors[i], packed);
91+
ESVectorUtil.packAsBinary(qVectors[i], packed);
9192
bh.consume(packed);
9293
}
9394
}
95+
96+
private static void packAsBinaryLegacy(int[] vector, byte[] packed) {
97+
for (int i = 0; i < vector.length;) {
98+
byte result = 0;
99+
for (int j = 7; j >= 0 && i < vector.length; j--) {
100+
assert vector[i] == 0 || vector[i] == 1;
101+
result |= (byte) ((vector[i] & 1) << j);
102+
++i;
103+
}
104+
int index = ((i + 7) / 8) - 1;
105+
assert index < packed.length;
106+
packed[index] = result;
107+
}
108+
}
94109
}

benchmarks/src/main/java/org/elasticsearch/benchmark/vector/TransposeHalfByteBenchmark.java

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
package org.elasticsearch.benchmark.vector;
1010

1111
import org.elasticsearch.common.logging.LogConfigurator;
12-
import org.elasticsearch.index.codec.vectors.BQSpaceUtils;
1312
import org.elasticsearch.index.codec.vectors.BQVectorUtils;
13+
import org.elasticsearch.simdvec.ESVectorUtil;
1414
import org.openjdk.jmh.annotations.Benchmark;
1515
import org.openjdk.jmh.annotations.BenchmarkMode;
1616
import org.openjdk.jmh.annotations.Fork;
@@ -71,15 +71,15 @@ public void setup() throws IOException {
7171
@Benchmark
7272
public void transposeHalfByte(Blackhole bh) {
7373
for (int i = 0; i < numVectors; i++) {
74-
BQSpaceUtils.transposeHalfByte(qVectors[i], packed);
74+
ESVectorUtil.transposeHalfByte(qVectors[i], packed);
7575
bh.consume(packed);
7676
}
7777
}
7878

7979
@Benchmark
8080
public void transposeHalfByteLegacy(Blackhole bh) {
8181
for (int i = 0; i < numVectors; i++) {
82-
BQSpaceUtils.transposeHalfByteLegacy(qVectors[i], packed);
82+
transposeHalfByteLegacy(qVectors[i], packed);
8383
bh.consume(packed);
8484
}
8585
}
@@ -88,8 +88,30 @@ public void transposeHalfByteLegacy(Blackhole bh) {
8888
@Fork(jvmArgsPrepend = { "--add-modules=jdk.incubator.vector" })
8989
public void transposeHalfBytePanama(Blackhole bh) {
9090
for (int i = 0; i < numVectors; i++) {
91-
BQSpaceUtils.transposeHalfByte(qVectors[i], packed);
91+
ESVectorUtil.transposeHalfByte(qVectors[i], packed);
9292
bh.consume(packed);
9393
}
9494
}
95+
96+
public static void transposeHalfByteLegacy(int[] q, byte[] quantQueryByte) {
97+
for (int i = 0; i < q.length;) {
98+
assert q[i] >= 0 && q[i] <= 15;
99+
int lowerByte = 0;
100+
int lowerMiddleByte = 0;
101+
int upperMiddleByte = 0;
102+
int upperByte = 0;
103+
for (int j = 7; j >= 0 && i < q.length; j--) {
104+
lowerByte |= (q[i] & 1) << j;
105+
lowerMiddleByte |= ((q[i] >> 1) & 1) << j;
106+
upperMiddleByte |= ((q[i] >> 2) & 1) << j;
107+
upperByte |= ((q[i] >> 3) & 1) << j;
108+
i++;
109+
}
110+
int index = ((i + 7) / 8) - 1;
111+
quantQueryByte[index] = (byte) lowerByte;
112+
quantQueryByte[index + quantQueryByte.length / 4] = (byte) lowerMiddleByte;
113+
quantQueryByte[index + quantQueryByte.length / 2] = (byte) upperMiddleByte;
114+
quantQueryByte[index + 3 * quantQueryByte.length / 4] = (byte) upperByte;
115+
}
116+
}
95117
}

branches.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
{
99
"branch" : "9.2",
10-
"version" : "9.2.0"
10+
"version" : "9.2.1"
1111
},
1212
{
1313
"branch" : "9.1",
@@ -22,4 +22,4 @@
2222
"version" : "7.17.30"
2323
}
2424
]
25-
}
25+
}

docs/changelog/105718.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)