Skip to content

Commit c899561

Browse files
committed
Merge branch 'main' into one-package
2 parents a408a56 + adccaa6 commit c899561

File tree

512 files changed

+14391
-4958
lines changed

Some content is hidden

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

512 files changed

+14391
-4958
lines changed

.buildkite/pipelines/intake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ steps:
5656
timeout_in_minutes: 300
5757
matrix:
5858
setup:
59-
BWC_VERSION: ["8.16.7", "8.17.4", "8.18.0", "8.19.0", "9.0.0", "9.1.0"]
59+
BWC_VERSION: ["8.16.7", "8.17.5", "8.18.0", "8.19.0", "9.0.0", "9.1.0"]
6060
agents:
6161
provider: gcp
6262
image: family/elasticsearch-ubuntu-2004

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,8 @@ steps:
303303
env:
304304
BWC_VERSION: 8.16.7
305305

306-
- label: "{{matrix.image}} / 8.17.4 / packaging-tests-upgrade"
307-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.4
306+
- label: "{{matrix.image}} / 8.17.5 / packaging-tests-upgrade"
307+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.5
308308
timeout_in_minutes: 300
309309
matrix:
310310
setup:
@@ -317,7 +317,7 @@ steps:
317317
machineType: custom-16-32768
318318
buildDirectory: /dev/shm/bk
319319
env:
320-
BWC_VERSION: 8.17.4
320+
BWC_VERSION: 8.17.5
321321

322322
- label: "{{matrix.image}} / 8.18.0 / packaging-tests-upgrade"
323323
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.18.0

.buildkite/pipelines/periodic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ steps:
325325
- signal_reason: agent_stop
326326
limit: 3
327327

328-
- label: 8.17.4 / bwc
329-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.4#bwcTest
328+
- label: 8.17.5 / bwc
329+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.5#bwcTest
330330
timeout_in_minutes: 300
331331
agents:
332332
provider: gcp
@@ -335,7 +335,7 @@ steps:
335335
buildDirectory: /dev/shm/bk
336336
preemptible: true
337337
env:
338-
BWC_VERSION: 8.17.4
338+
BWC_VERSION: 8.17.5
339339
retry:
340340
automatic:
341341
- exit_status: "-1"
@@ -486,7 +486,7 @@ steps:
486486
setup:
487487
ES_RUNTIME_JAVA:
488488
- openjdk21
489-
BWC_VERSION: ["8.16.7", "8.17.4", "8.18.0", "8.19.0", "9.0.0", "9.1.0"]
489+
BWC_VERSION: ["8.16.7", "8.17.5", "8.18.0", "8.19.0", "9.0.0", "9.1.0"]
490490
agents:
491491
provider: gcp
492492
image: family/elasticsearch-ubuntu-2004
@@ -533,7 +533,7 @@ steps:
533533
ES_RUNTIME_JAVA:
534534
- openjdk21
535535
- openjdk23
536-
BWC_VERSION: ["8.16.7", "8.17.4", "8.18.0", "8.19.0", "9.0.0", "9.1.0"]
536+
BWC_VERSION: ["8.16.7", "8.17.5", "8.18.0", "8.19.0", "9.0.0", "9.1.0"]
537537
agents:
538538
provider: gcp
539539
image: family/elasticsearch-ubuntu-2004

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BWC_VERSION:
1616
- "8.14.3"
1717
- "8.15.5"
1818
- "8.16.7"
19-
- "8.17.4"
19+
- "8.17.5"
2020
- "8.18.0"
2121
- "8.19.0"
2222
- "9.0.0"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BWC_VERSION:
22
- "8.16.7"
3-
- "8.17.4"
3+
- "8.17.5"
44
- "8.18.0"
55
- "8.19.0"
66
- "9.0.0"

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

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
import org.elasticsearch.common.logging.LogConfigurator;
1414
import org.elasticsearch.index.IndexVersion;
1515
import org.elasticsearch.script.field.vectors.BinaryDenseVector;
16+
import org.elasticsearch.script.field.vectors.BitBinaryDenseVector;
17+
import org.elasticsearch.script.field.vectors.BitKnnDenseVector;
1618
import org.elasticsearch.script.field.vectors.ByteBinaryDenseVector;
1719
import org.elasticsearch.script.field.vectors.ByteKnnDenseVector;
1820
import org.elasticsearch.script.field.vectors.DenseVector;
@@ -37,30 +39,30 @@
3739
import java.util.function.DoubleSupplier;
3840

3941
/**
40-
* Various benchmarks for the distance functions
41-
* used by indexed and non-indexed vectors.
42-
* Parameters include element, dims, function, and type.
42+
* Various benchmarks for the distance functions used by indexed and non-indexed vectors.
43+
* Parameters include doc and query type, dims, function, and implementation.
4344
* For individual local tests it may be useful to increase
44-
* fork, measurement, and operations per invocation. (Note
45-
* to also update the benchmark loop if operations per invocation
46-
* is increased.)
45+
* fork, measurement, and operations per invocation.
4746
*/
4847
@Fork(1)
4948
@Warmup(iterations = 1)
5049
@Measurement(iterations = 2)
5150
@BenchmarkMode(Mode.AverageTime)
5251
@OutputTimeUnit(TimeUnit.NANOSECONDS)
53-
@OperationsPerInvocation(25000)
52+
@OperationsPerInvocation(DistanceFunctionBenchmark.OPERATIONS)
5453
@State(Scope.Benchmark)
5554
public class DistanceFunctionBenchmark {
5655

56+
public static final int OPERATIONS = 25000;
57+
5758
static {
5859
LogConfigurator.configureESLogging();
5960
}
6061

6162
public enum VectorType {
6263
FLOAT,
63-
BYTE
64+
BYTE,
65+
BIT
6466
}
6567

6668
public enum Function {
@@ -122,7 +124,7 @@ private static BytesRef generateVectorData(float[] vector) {
122124
}
123125

124126
private static BytesRef generateVectorData(float[] vector, float mag) {
125-
ByteBuffer buffer = ByteBuffer.allocate(vector.length * 4 + 4);
127+
ByteBuffer buffer = ByteBuffer.allocate(vector.length * Float.BYTES + Float.BYTES);
126128
for (float f : vector) {
127129
buffer.putFloat(f);
128130
}
@@ -133,24 +135,29 @@ private static BytesRef generateVectorData(float[] vector, float mag) {
133135
private static BytesRef generateVectorData(byte[] vector) {
134136
float mag = calculateMag(vector);
135137

136-
ByteBuffer buffer = ByteBuffer.allocate(vector.length + 4);
138+
ByteBuffer buffer = ByteBuffer.allocate(vector.length + Float.BYTES);
137139
buffer.put(vector);
138140
buffer.putFloat(mag);
139141
return new BytesRef(buffer.array());
140142
}
141143

142144
@Setup
143145
public void findBenchmarkImpl() {
146+
if (dims % 8 != 0) throw new IllegalArgumentException("Dims must be a multiple of 8");
144147
Random r = new Random();
145148

146149
float[] floatDocVector = new float[dims];
147150
byte[] byteDocVector = new byte[dims];
151+
byte[] bitDocVector = new byte[dims / 8];
148152

149153
float[] floatQueryVector = new float[dims];
150154
byte[] byteQueryVector = new byte[dims];
155+
byte[] bitQueryVector = new byte[dims / 8];
151156

152157
r.nextBytes(byteDocVector);
158+
r.nextBytes(bitDocVector);
153159
r.nextBytes(byteQueryVector);
160+
r.nextBytes(bitQueryVector);
154161
for (int i = 0; i < dims; i++) {
155162
floatDocVector[i] = r.nextFloat();
156163
floatQueryVector[i] = r.nextFloat();
@@ -179,10 +186,11 @@ public void findBenchmarkImpl() {
179186
};
180187
case BYTE -> switch (type) {
181188
case KNN -> new ByteKnnDenseVector(byteDocVector);
182-
case BINARY -> {
183-
BytesRef vectorData = generateVectorData(byteDocVector);
184-
yield new ByteBinaryDenseVector(byteDocVector, vectorData, dims);
185-
}
189+
case BINARY -> new ByteBinaryDenseVector(byteDocVector, generateVectorData(byteDocVector), dims);
190+
};
191+
case BIT -> switch (type) {
192+
case KNN -> new BitKnnDenseVector(bitDocVector);
193+
case BINARY -> new BitBinaryDenseVector(bitDocVector, new BytesRef(bitDocVector), bitDocVector.length);
186194
};
187195
};
188196

@@ -204,21 +212,28 @@ public void findBenchmarkImpl() {
204212
case L2 -> () -> vectorImpl.l2Norm(byteQueryVector);
205213
case HAMMING -> () -> vectorImpl.hamming(byteQueryVector);
206214
};
215+
case BIT -> switch (function) {
216+
case DOT -> () -> vectorImpl.dotProduct(bitQueryVector);
217+
case COSINE -> throw new UnsupportedOperationException("Unsupported function " + function);
218+
case L1 -> () -> vectorImpl.l1Norm(bitQueryVector);
219+
case L2 -> () -> vectorImpl.l2Norm(bitQueryVector);
220+
case HAMMING -> () -> vectorImpl.hamming(bitQueryVector);
221+
};
207222
};
208223
}
209224

210225
@Fork(1)
211226
@Benchmark
212227
public void benchmark(Blackhole blackhole) {
213-
for (int i = 0; i < 25000; ++i) {
228+
for (int i = 0; i < OPERATIONS; ++i) {
214229
blackhole.consume(benchmarkImpl.getAsDouble());
215230
}
216231
}
217232

218233
@Fork(value = 1, jvmArgsPrepend = { "--add-modules=jdk.incubator.vector" })
219234
@Benchmark
220235
public void vectorBenchmark(Blackhole blackhole) {
221-
for (int i = 0; i < 25000; ++i) {
236+
for (int i = 0; i < OPERATIONS; ++i) {
222237
blackhole.consume(benchmarkImpl.getAsDouble());
223238
}
224239
}

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ public enum DockerBase {
2222
// Chainguard based wolfi image with latest jdk
2323
// This is usually updated via renovatebot
2424
// spotless:off
25-
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:15a4191ff8ec8305dcba449365e8a1586c9cda8e016ae838d960b9009c6a5cac",
25+
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:c4e10ecf3d8a21cf4be2fb53a2f522de50e14c80ce1da487e3ffd13f4d48d24d",
2626
"-wolfi",
2727
"apk"
2828
),
29+
30+
FIPS("docker.elastic.co/wolfi/chainguard-base-fips:sha256-feb7aeb1bbcb331afa089388f2fa1e81997fc24642ca4fa06b7e502ff599a4cf", "-fips", "apk"),
2931
// spotless:on
3032
// Based on WOLFI above, with more extras. We don't set a base image because
3133
// we programmatically extend from the wolfi image.

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

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29,46 +29,13 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
2929
ListMultimap<Class<?>, String> map = ArrayListMultimap.create(1, 200);
3030
map.put(LegacyRestTestBasePlugin.class, ":docs");
3131
map.put(LegacyRestTestBasePlugin.class, ":distribution:docker");
32-
map.put(LegacyRestTestBasePlugin.class, ":modules:lang-expression");
33-
map.put(LegacyRestTestBasePlugin.class, ":modules:lang-mustache");
34-
map.put(LegacyRestTestBasePlugin.class, ":modules:mapper-extras");
35-
map.put(LegacyRestTestBasePlugin.class, ":modules:parent-join");
36-
map.put(LegacyRestTestBasePlugin.class, ":modules:percolator");
37-
map.put(LegacyRestTestBasePlugin.class, ":modules:rank-eval");
3832
map.put(LegacyRestTestBasePlugin.class, ":modules:reindex");
39-
map.put(LegacyRestTestBasePlugin.class, ":modules:repository-url");
40-
map.put(LegacyRestTestBasePlugin.class, ":modules:transport-netty4");
41-
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-icu");
42-
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-kuromoji");
43-
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-nori");
44-
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-phonetic");
45-
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-smartcn");
46-
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-stempel");
47-
map.put(LegacyRestTestBasePlugin.class, ":plugins:analysis-ukrainian");
48-
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-azure-classic");
49-
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-ec2");
50-
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-gce");
51-
map.put(LegacyRestTestBasePlugin.class, ":plugins:mapper-annotated-text");
52-
map.put(LegacyRestTestBasePlugin.class, ":plugins:store-smb");
5333
map.put(LegacyRestTestBasePlugin.class, ":qa:ccs-rolling-upgrade-remote-cluster");
5434
map.put(LegacyRestTestBasePlugin.class, ":qa:mixed-cluster");
5535
map.put(LegacyRestTestBasePlugin.class, ":qa:multi-cluster-search");
5636
map.put(LegacyRestTestBasePlugin.class, ":qa:remote-clusters");
5737
map.put(LegacyRestTestBasePlugin.class, ":qa:repository-multi-version");
5838
map.put(LegacyRestTestBasePlugin.class, ":qa:rolling-upgrade-legacy");
59-
map.put(LegacyRestTestBasePlugin.class, ":qa:smoke-test-http");
60-
map.put(LegacyRestTestBasePlugin.class, ":qa:smoke-test-ingest-disabled");
61-
map.put(LegacyRestTestBasePlugin.class, ":qa:smoke-test-ingest-with-all-dependencies");
62-
map.put(LegacyRestTestBasePlugin.class, ":qa:smoke-test-plugins");
63-
map.put(LegacyRestTestBasePlugin.class, ":qa:system-indices");
64-
map.put(LegacyRestTestBasePlugin.class, ":qa:verify-version-constants");
65-
map.put(LegacyRestTestBasePlugin.class, ":test:external-modules:test-apm-integration");
66-
map.put(LegacyRestTestBasePlugin.class, ":test:external-modules:test-delayed-aggs");
67-
map.put(LegacyRestTestBasePlugin.class, ":test:external-modules:test-die-with-dignity");
68-
map.put(LegacyRestTestBasePlugin.class, ":test:external-modules:test-error-query");
69-
map.put(LegacyRestTestBasePlugin.class, ":test:external-modules:test-latency-simulating-directory");
70-
map.put(LegacyRestTestBasePlugin.class, ":test:yaml-rest-runner");
71-
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:core");
7239
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:ent-search");
7340
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:fleet");
7441
map.put(LegacyRestTestBasePlugin.class, ":x-pack:plugin:logstash");
@@ -86,8 +53,6 @@ private static ListMultimap<Class<?>, String> createLegacyRestTestBasePluginUsag
8653
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:smoke-test-plugins-ssl");
8754
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:smoke-test-security-with-mustache");
8855
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:xpack-prefix-rest-compat");
89-
map.put(LegacyRestTestBasePlugin.class, ":modules:ingest-geoip:qa:file-based-update");
90-
map.put(LegacyRestTestBasePlugin.class, ":plugins:discovery-gce:qa:gce");
9156
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:multi-cluster-search-security:legacy-with-basic-license");
9257
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:multi-cluster-search-security:legacy-with-full-license");
9358
map.put(LegacyRestTestBasePlugin.class, ":x-pack:qa:multi-cluster-search-security:legacy-with-restricted-trust");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
10+
package org.elasticsearch.gradle.internal.distribution;
11+
12+
import org.elasticsearch.gradle.ElasticsearchDistributionType;
13+
14+
public class DockerFipsElasticsearchDistributionType implements ElasticsearchDistributionType {
15+
16+
DockerFipsElasticsearchDistributionType() {}
17+
18+
@Override
19+
public String getName() {
20+
return "dockerFips";
21+
}
22+
23+
@Override
24+
public boolean isDocker() {
25+
return true;
26+
}
27+
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,22 @@
1414
import java.util.List;
1515

1616
public class InternalElasticsearchDistributionTypes {
17+
1718
public static final ElasticsearchDistributionType DEB = new DebElasticsearchDistributionType();
1819
public static final ElasticsearchDistributionType RPM = new RpmElasticsearchDistributionType();
1920
public static final ElasticsearchDistributionType DOCKER = new DockerElasticsearchDistributionType();
2021
public static final ElasticsearchDistributionType DOCKER_IRONBANK = new DockerIronBankElasticsearchDistributionType();
2122
public static final ElasticsearchDistributionType DOCKER_CLOUD_ESS = new DockerCloudEssElasticsearchDistributionType();
2223
public static final ElasticsearchDistributionType DOCKER_WOLFI = new DockerWolfiElasticsearchDistributionType();
24+
public static final ElasticsearchDistributionType DOCKER_FIPS = new DockerFipsElasticsearchDistributionType();
2325

2426
public static final List<ElasticsearchDistributionType> ALL_INTERNAL = List.of(
2527
DEB,
2628
RPM,
2729
DOCKER,
2830
DOCKER_IRONBANK,
31+
DOCKER_WOLFI,
2932
DOCKER_CLOUD_ESS,
30-
DOCKER_WOLFI
33+
DOCKER_FIPS
3134
);
3235
}

0 commit comments

Comments
 (0)