Skip to content

Commit dac102a

Browse files
Merge branch 'main' into master-node-disconnect
2 parents b6ddfba + 8e3ab37 commit dac102a

File tree

389 files changed

+15008
-2512
lines changed

Some content is hidden

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

389 files changed

+15008
-2512
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.1", "9.0.5", "9.1.1", "9.2.0"]
68+
BWC_VERSION: ["8.17.10", "8.18.5", "8.19.2", "9.0.5", "9.1.2", "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.1 / packaging-tests-upgrade"
338-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.19.1
337+
- label: "{{matrix.image}} / 8.19.2 / packaging-tests-upgrade"
338+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.19.2
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.1
351+
BWC_VERSION: 8.19.2
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.1 / packaging-tests-upgrade"
370-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.1
369+
- label: "{{matrix.image}} / 9.1.2 / packaging-tests-upgrade"
370+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v9.1.2
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.1
383+
BWC_VERSION: 9.1.2
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.template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ steps:
246246
image: family/elasticsearch-ubuntu-2404
247247
machineType: n2-standard-8
248248
buildDirectory: /dev/shm/bk
249-
if: build.branch == "main" || build.branch == "8.19" || build.branch == "7.17"
249+
if: build.branch == "main" || build.branch == "9.1" || build.branch == "9.0" || build.branch == "8.19" || build.branch == "8.18" || build.branch == "7.17"
250250
- label: check-branch-consistency
251251
command: .ci/scripts/run-gradle.sh branchConsistency
252252
timeout_in_minutes: 15

.buildkite/pipelines/periodic.yml

Lines changed: 9 additions & 9 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.1 / bwc
367-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.19.1#bwcTest
366+
- label: 8.19.2 / bwc
367+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.19.2#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.1
376+
BWC_VERSION: 8.19.2
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.1 / bwc
405-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.1#bwcTest
404+
- label: 9.1.2 / bwc
405+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v9.1.2#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.1
414+
BWC_VERSION: 9.1.2
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.1", "9.0.5", "9.1.1", "9.2.0"]
509+
BWC_VERSION: ["8.17.10", "8.18.5", "8.19.2", "9.0.5", "9.1.2", "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.1", "9.0.5", "9.1.1", "9.2.0"]
553+
BWC_VERSION: ["8.17.10", "8.18.5", "8.19.2", "9.0.5", "9.1.2", "9.2.0"]
554554
agents:
555555
provider: gcp
556556
image: family/elasticsearch-ubuntu-2404
@@ -684,7 +684,7 @@ steps:
684684
image: family/elasticsearch-ubuntu-2404
685685
machineType: n2-standard-8
686686
buildDirectory: /dev/shm/bk
687-
if: build.branch == "main" || build.branch == "8.19" || build.branch == "7.17"
687+
if: build.branch == "main" || build.branch == "9.1" || build.branch == "9.0" || build.branch == "8.19" || build.branch == "8.18" || build.branch == "7.17"
688688
- label: check-branch-consistency
689689
command: .ci/scripts/run-gradle.sh branchConsistency
690690
timeout_in_minutes: 15

.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.1"
21+
- "8.19.2"
2222
- "9.0.5"
23-
- "9.1.1"
23+
- "9.1.2"
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.1"
4+
- "8.19.2"
55
- "9.0.5"
6-
- "9.1.1"
6+
- "9.1.2"
77
- "9.2.0"

benchmarks/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ dependencies {
4949
api(project(':x-pack:plugin:esql:compute'))
5050
implementation project(path: ':libs:native')
5151
implementation project(path: ':libs:simdvec')
52+
implementation project(path: ':libs:exponential-histogram')
5253
expression(project(path: ':modules:lang-expression', configuration: 'zip'))
5354
painless(project(path: ':modules:lang-painless', configuration: 'zip'))
5455
nativeLib(project(':libs:native'))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
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.benchmark.exponentialhistogram;
11+
12+
import org.elasticsearch.exponentialhistogram.ExponentialHistogramGenerator;
13+
import org.openjdk.jmh.annotations.Benchmark;
14+
import org.openjdk.jmh.annotations.BenchmarkMode;
15+
import org.openjdk.jmh.annotations.Fork;
16+
import org.openjdk.jmh.annotations.Measurement;
17+
import org.openjdk.jmh.annotations.Mode;
18+
import org.openjdk.jmh.annotations.OutputTimeUnit;
19+
import org.openjdk.jmh.annotations.Param;
20+
import org.openjdk.jmh.annotations.Scope;
21+
import org.openjdk.jmh.annotations.Setup;
22+
import org.openjdk.jmh.annotations.State;
23+
import org.openjdk.jmh.annotations.Threads;
24+
import org.openjdk.jmh.annotations.Warmup;
25+
import org.openjdk.jmh.profile.GCProfiler;
26+
import org.openjdk.jmh.profile.StackProfiler;
27+
import org.openjdk.jmh.runner.Runner;
28+
import org.openjdk.jmh.runner.RunnerException;
29+
import org.openjdk.jmh.runner.options.Options;
30+
import org.openjdk.jmh.runner.options.OptionsBuilder;
31+
32+
import java.util.Random;
33+
import java.util.concurrent.ThreadLocalRandom;
34+
import java.util.concurrent.TimeUnit;
35+
import java.util.function.DoubleSupplier;
36+
37+
@BenchmarkMode(Mode.AverageTime)
38+
@OutputTimeUnit(TimeUnit.NANOSECONDS)
39+
@Warmup(iterations = 3, time = 3, timeUnit = TimeUnit.SECONDS)
40+
@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
41+
@Fork(1)
42+
@Threads(1)
43+
@State(Scope.Thread)
44+
public class ExponentialHistogramGenerationBench {
45+
46+
@Param({ "100", "500", "1000", "5000", "10000", "20000" })
47+
int bucketCount;
48+
49+
@Param({ "NORMAL", "GAUSSIAN" })
50+
String distribution;
51+
52+
Random random;
53+
ExponentialHistogramGenerator histoGenerator;
54+
55+
double[] data = new double[1000000];
56+
57+
int index;
58+
59+
@Setup
60+
public void setUp() {
61+
random = ThreadLocalRandom.current();
62+
histoGenerator = new ExponentialHistogramGenerator(bucketCount);
63+
64+
DoubleSupplier nextRandom = () -> distribution.equals("GAUSSIAN") ? random.nextGaussian() : random.nextDouble();
65+
66+
// Make sure that we start with a non-empty histogram, as this distorts initial additions
67+
for (int i = 0; i < 10000; ++i) {
68+
histoGenerator.add(nextRandom.getAsDouble());
69+
}
70+
71+
for (int i = 0; i < data.length; ++i) {
72+
data[i] = nextRandom.getAsDouble();
73+
}
74+
75+
index = 0;
76+
}
77+
78+
@Benchmark
79+
@BenchmarkMode(Mode.AverageTime)
80+
@OutputTimeUnit(TimeUnit.MICROSECONDS)
81+
public void add() {
82+
if (index >= data.length) {
83+
index = 0;
84+
}
85+
histoGenerator.add(data[index++]);
86+
}
87+
88+
public static void main(String[] args) throws RunnerException {
89+
Options opt = new OptionsBuilder().include(".*" + ExponentialHistogramGenerationBench.class.getSimpleName() + ".*")
90+
.warmupIterations(5)
91+
.measurementIterations(5)
92+
.addProfiler(GCProfiler.class)
93+
.addProfiler(StackProfiler.class)
94+
.build();
95+
96+
new Runner(opt).run();
97+
}
98+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
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.benchmark.exponentialhistogram;
11+
12+
import org.elasticsearch.exponentialhistogram.BucketIterator;
13+
import org.elasticsearch.exponentialhistogram.ExponentialHistogram;
14+
import org.elasticsearch.exponentialhistogram.ExponentialHistogramGenerator;
15+
import org.elasticsearch.exponentialhistogram.ExponentialHistogramMerger;
16+
import org.openjdk.jmh.annotations.Benchmark;
17+
import org.openjdk.jmh.annotations.BenchmarkMode;
18+
import org.openjdk.jmh.annotations.Fork;
19+
import org.openjdk.jmh.annotations.Measurement;
20+
import org.openjdk.jmh.annotations.Mode;
21+
import org.openjdk.jmh.annotations.OutputTimeUnit;
22+
import org.openjdk.jmh.annotations.Param;
23+
import org.openjdk.jmh.annotations.Scope;
24+
import org.openjdk.jmh.annotations.Setup;
25+
import org.openjdk.jmh.annotations.State;
26+
import org.openjdk.jmh.annotations.Threads;
27+
import org.openjdk.jmh.annotations.Warmup;
28+
29+
import java.util.List;
30+
import java.util.Random;
31+
import java.util.concurrent.ThreadLocalRandom;
32+
import java.util.concurrent.TimeUnit;
33+
34+
@BenchmarkMode(Mode.AverageTime)
35+
@OutputTimeUnit(TimeUnit.NANOSECONDS)
36+
@Warmup(iterations = 3, time = 3, timeUnit = TimeUnit.SECONDS)
37+
@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
38+
@Fork(1)
39+
@Threads(1)
40+
@State(Scope.Thread)
41+
public class ExponentialHistogramMergeBench {
42+
43+
@Param({ "1000", "2000", "5000" })
44+
int bucketCount;
45+
46+
@Param({ "0.01", "0.1", "0.25", "0.5", "1.0", "2.0" })
47+
double mergedHistoSizeFactor;
48+
49+
Random random;
50+
ExponentialHistogramMerger histoMerger;
51+
52+
ExponentialHistogram[] toMerge = new ExponentialHistogram[10_000];
53+
54+
int index;
55+
56+
@Setup
57+
public void setUp() {
58+
random = ThreadLocalRandom.current();
59+
histoMerger = new ExponentialHistogramMerger(bucketCount);
60+
61+
ExponentialHistogramGenerator initial = new ExponentialHistogramGenerator(bucketCount);
62+
for (int j = 0; j < bucketCount; j++) {
63+
initial.add(Math.pow(1.001, j));
64+
}
65+
ExponentialHistogram initialHisto = initial.get();
66+
int cnt = getBucketCount(initialHisto);
67+
if (cnt < bucketCount) {
68+
throw new IllegalArgumentException("Expected bucket count to be " + bucketCount + ", but was " + cnt);
69+
}
70+
histoMerger.add(initialHisto);
71+
72+
int dataPointSize = (int) Math.round(bucketCount * mergedHistoSizeFactor);
73+
74+
for (int i = 0; i < toMerge.length; i++) {
75+
ExponentialHistogramGenerator generator = new ExponentialHistogramGenerator(dataPointSize);
76+
77+
int bucketIndex = 0;
78+
for (int j = 0; j < dataPointSize; j++) {
79+
bucketIndex += 1 + random.nextInt(bucketCount) % (Math.max(1, bucketCount / dataPointSize));
80+
generator.add(Math.pow(1.001, bucketIndex));
81+
}
82+
toMerge[i] = generator.get();
83+
cnt = getBucketCount(toMerge[i]);
84+
if (cnt < dataPointSize) {
85+
throw new IllegalArgumentException("Expected bucket count to be " + dataPointSize + ", but was " + cnt);
86+
}
87+
}
88+
89+
index = 0;
90+
}
91+
92+
private static int getBucketCount(ExponentialHistogram histo) {
93+
int cnt = 0;
94+
for (BucketIterator it : List.of(histo.negativeBuckets().iterator(), histo.positiveBuckets().iterator())) {
95+
while (it.hasNext()) {
96+
cnt++;
97+
it.advance();
98+
}
99+
}
100+
return cnt;
101+
}
102+
103+
@Benchmark
104+
@BenchmarkMode(Mode.AverageTime)
105+
@OutputTimeUnit(TimeUnit.MICROSECONDS)
106+
public void add() {
107+
if (index >= toMerge.length) {
108+
index = 0;
109+
}
110+
histoMerger.add(toMerge[index++]);
111+
}
112+
}

build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/precommit/LicenseHeadersTask.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ public void runRat() {
173173
matchers.add(subStringMatcher("BSD4 ", "Original BSD License (with advertising clause)", "All advertising materials"));
174174
// Apache
175175
matchers.add(subStringMatcher("AL ", "Apache", "Licensed to Elasticsearch B.V. under one or more contributor"));
176+
matchers.add(subStringMatcher("AL ", "Apache", "Copyright Elasticsearch B.V., and/or licensed to Elasticsearch B.V."));
176177
// Apache lz4-java
177178
matchers.add(subStringMatcher("ALLZ4", "Apache LZ4-Java", "Copyright 2020 Adrien Grand and the lz4-java contributors"));
178179
// Generated resources

0 commit comments

Comments
 (0)