Skip to content

Commit 013120d

Browse files
authored
Merge branch 'main' into renovate/main-wolfi-versioned
2 parents fd8b5a8 + 47d4b98 commit 013120d

File tree

845 files changed

+33925
-9838
lines changed

Some content is hidden

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

845 files changed

+33925
-9838
lines changed

.buildkite/hooks/pre-command

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,11 @@ if [[ "${USE_PROD_DOCKER_CREDENTIALS:-}" == "true" ]]; then
9595
fi
9696

9797
if [[ "${USE_PERF_CREDENTIALS:-}" == "true" ]]; then
98-
PERF_METRICS_HOST=$(vault read -field=es_host /secret/ci/elastic-elasticsearch/esbench-metics)
99-
PERF_METRICS_INDEX="dummy-micro-benchmarks"
100-
PERF_METRICS_USERNAME=$(vault read -field=es_username /secret/ci/elastic-elasticsearch/esbench-metics)
101-
PERF_METRICS_PASSWORD=$(vault read -field=es_password /secret/ci/elastic-elasticsearch/esbench-metics)
98+
PERF_METRICS_HOST=$(vault read -field=es_host /secret/ci/elastic-elasticsearch/microbenchmarks-metrics)
99+
PERF_METRICS_USERNAME=$(vault read -field=es_username /secret/ci/elastic-elasticsearch/microbenchmarks-metrics)
100+
PERF_METRICS_PASSWORD=$(vault read -field=es_password /secret/ci/elastic-elasticsearch/microbenchmarks-metrics)
102101

103102
export PERF_METRICS_HOST
104-
export PERF_METRICS_INDEX
105103
export PERF_METRICS_USERNAME
106104
export PERF_METRICS_PASSWORD
107105
fi

.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.17.7", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
59+
BWC_VERSION: ["8.17.8", "8.18.3", "8.19.0", "9.0.3", "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.6
305305

306-
- label: "{{matrix.image}} / 8.17.7 / packaging-tests-upgrade"
307-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.7
306+
- label: "{{matrix.image}} / 8.17.8 / packaging-tests-upgrade"
307+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.8
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.7
320+
BWC_VERSION: 8.17.8
321321

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

.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.7 / bwc
329-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.7#bwcTest
328+
- label: 8.17.8 / bwc
329+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.17.8#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.7
338+
BWC_VERSION: 8.17.8
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.17.7", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
489+
BWC_VERSION: ["8.17.8", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
490490
agents:
491491
provider: gcp
492492
image: family/elasticsearch-ubuntu-2004
@@ -529,7 +529,7 @@ steps:
529529
ES_RUNTIME_JAVA:
530530
- openjdk21
531531
- openjdk23
532-
BWC_VERSION: ["8.17.7", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
532+
BWC_VERSION: ["8.17.8", "8.18.3", "8.19.0", "9.0.3", "9.1.0"]
533533
agents:
534534
provider: gcp
535535
image: family/elasticsearch-ubuntu-2004

.buildkite/scripts/index-micro-benchmark-results.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
jq -c '.[]' "benchmarks/build/result.json" | while read -r doc; do
44
doc=$(echo "$doc" | jq --argjson timestamp "$(date +%s000)" '. + {"@timestamp": $timestamp}')
55
echo "Indexing $(echo "$doc" | jq -r '.benchmark')"
6-
curl -s -X POST "https://$PERF_METRICS_HOST/$PERF_METRICS_INDEX/_doc" \
6+
curl -s -X POST "https://$PERF_METRICS_HOST/metrics-microbenchmarks-default/_doc" \
77
-u "$PERF_METRICS_USERNAME:$PERF_METRICS_PASSWORD" \
88
-H 'Content-Type: application/json' \
99
-d "$doc"

.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.6"
19-
- "8.17.7"
19+
- "8.17.8"
2020
- "8.18.3"
2121
- "8.19.0"
2222
- "9.0.3"

.ci/snapshotBwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BWC_VERSION:
2-
- "8.17.7"
2+
- "8.17.8"
33
- "8.18.3"
44
- "8.19.0"
55
- "9.0.3"
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
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.xcontent;
11+
12+
import org.elasticsearch.benchmark.index.mapper.MapperServiceFactory;
13+
import org.elasticsearch.common.UUIDs;
14+
import org.elasticsearch.common.bytes.BytesReference;
15+
import org.elasticsearch.common.logging.LogConfigurator;
16+
import org.elasticsearch.index.mapper.MapperService;
17+
import org.elasticsearch.index.mapper.SourceToParse;
18+
import org.elasticsearch.xcontent.XContentBuilder;
19+
import org.elasticsearch.xcontent.XContentFactory;
20+
import org.elasticsearch.xcontent.XContentType;
21+
import org.openjdk.jmh.annotations.Benchmark;
22+
import org.openjdk.jmh.annotations.BenchmarkMode;
23+
import org.openjdk.jmh.annotations.Fork;
24+
import org.openjdk.jmh.annotations.Level;
25+
import org.openjdk.jmh.annotations.Measurement;
26+
import org.openjdk.jmh.annotations.Mode;
27+
import org.openjdk.jmh.annotations.OutputTimeUnit;
28+
import org.openjdk.jmh.annotations.Param;
29+
import org.openjdk.jmh.annotations.Scope;
30+
import org.openjdk.jmh.annotations.Setup;
31+
import org.openjdk.jmh.annotations.State;
32+
import org.openjdk.jmh.annotations.Threads;
33+
import org.openjdk.jmh.annotations.Warmup;
34+
import org.openjdk.jmh.infra.Blackhole;
35+
36+
import java.io.IOException;
37+
import java.util.Random;
38+
import java.util.concurrent.TimeUnit;
39+
40+
/**
41+
* Benchmark to measure indexing performance of keyword fields. Used to measure performance impact of skipping
42+
* UTF-8 to UTF-16 conversion during document parsing.
43+
*/
44+
@BenchmarkMode(Mode.AverageTime)
45+
@OutputTimeUnit(TimeUnit.MILLISECONDS)
46+
@State(Scope.Benchmark)
47+
@Fork(1)
48+
@Threads(1)
49+
@Warmup(iterations = 1)
50+
@Measurement(iterations = 5)
51+
public class OptimizedTextBenchmark {
52+
static {
53+
// For Elasticsearch900Lucene101Codec:
54+
LogConfigurator.loadLog4jPlugins();
55+
LogConfigurator.configureESLogging();
56+
LogConfigurator.setNodeName("test");
57+
}
58+
59+
/**
60+
* Total number of documents to index.
61+
*/
62+
@Param("1048576")
63+
private int nDocs;
64+
65+
private MapperService mapperService;
66+
private SourceToParse[] sources;
67+
68+
private String randomValue(int length) {
69+
final String CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
70+
Random random = new Random();
71+
StringBuilder builder = new StringBuilder(length);
72+
for (int i = 0; i < length; i++) {
73+
builder.append(CHARS.charAt(random.nextInt(CHARS.length())));
74+
}
75+
return builder.toString();
76+
}
77+
78+
@Setup(Level.Trial)
79+
public void setup() throws IOException {
80+
mapperService = MapperServiceFactory.create("""
81+
{
82+
"_doc": {
83+
"dynamic": false,
84+
"properties": {
85+
"field": {
86+
"type": "keyword"
87+
}
88+
}
89+
}
90+
}
91+
""");
92+
93+
sources = new SourceToParse[nDocs];
94+
for (int i = 0; i < nDocs; i++) {
95+
XContentBuilder b = XContentFactory.jsonBuilder();
96+
b.startObject().field("field", randomValue(8)).endObject();
97+
sources[i] = new SourceToParse(UUIDs.randomBase64UUID(), BytesReference.bytes(b), XContentType.JSON);
98+
}
99+
}
100+
101+
@Benchmark
102+
public void indexDocuments(final Blackhole bh) {
103+
final var mapper = mapperService.documentMapper();
104+
for (int i = 0; i < nDocs; i++) {
105+
bh.consume(mapper.parse(sources[i]));
106+
}
107+
}
108+
}

build-conventions/build.gradle

Lines changed: 62 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -17,88 +17,89 @@ buildscript {
1717
}
1818

1919
plugins {
20-
id 'java-gradle-plugin'
21-
id 'java-test-fixtures'
22-
id 'eclipse'
20+
id 'java-gradle-plugin'
21+
id 'java-test-fixtures'
22+
id 'eclipse'
2323
}
2424

2525
group = "org.elasticsearch"
2626

2727
// This project contains Checkstyle rule implementations used by IDEs which use a Java 11 runtime
2828
java {
29-
targetCompatibility = 11
30-
sourceCompatibility = 11
29+
targetCompatibility = 17
30+
sourceCompatibility = 17
3131
}
3232

3333
gradlePlugin {
34-
// We already configure publication and we don't need or want the one that comes
35-
// with the java-gradle-plugin
36-
automatedPublishing = false
37-
plugins {
38-
internalLicenseheaders {
39-
id = 'elasticsearch.internal-licenseheaders'
40-
implementationClass = 'org.elasticsearch.gradle.internal.conventions.precommit.LicenseHeadersPrecommitPlugin'
41-
}
42-
eclipse {
43-
id = 'elasticsearch.eclipse'
44-
implementationClass = 'org.elasticsearch.gradle.internal.conventions.EclipseConventionPlugin'
45-
}
46-
publish {
47-
id = 'elasticsearch.publish'
48-
implementationClass = 'org.elasticsearch.gradle.internal.conventions.PublishPlugin'
49-
}
50-
licensing {
51-
id = 'elasticsearch.licensing'
52-
implementationClass = 'org.elasticsearch.gradle.internal.conventions.LicensingPlugin'
53-
}
54-
buildTools {
55-
id = 'elasticsearch.build-tools'
56-
implementationClass = 'org.elasticsearch.gradle.internal.conventions.BuildToolsConventionsPlugin'
57-
}
58-
versions {
59-
id = 'elasticsearch.versions'
60-
implementationClass = 'org.elasticsearch.gradle.internal.conventions.VersionPropertiesPlugin'
61-
}
62-
formatting {
63-
id = 'elasticsearch.formatting'
64-
implementationClass = 'org.elasticsearch.gradle.internal.conventions.precommit.FormattingPrecommitPlugin'
65-
}
34+
// We already configure publication and we don't need or want the one that comes
35+
// with the java-gradle-plugin
36+
automatedPublishing = false
37+
plugins {
38+
internalLicenseheaders {
39+
id = 'elasticsearch.internal-licenseheaders'
40+
implementationClass = 'org.elasticsearch.gradle.internal.conventions.precommit.LicenseHeadersPrecommitPlugin'
6641
}
42+
eclipse {
43+
id = 'elasticsearch.eclipse'
44+
implementationClass = 'org.elasticsearch.gradle.internal.conventions.EclipseConventionPlugin'
45+
}
46+
publish {
47+
id = 'elasticsearch.publish'
48+
implementationClass = 'org.elasticsearch.gradle.internal.conventions.PublishPlugin'
49+
}
50+
licensing {
51+
id = 'elasticsearch.licensing'
52+
implementationClass = 'org.elasticsearch.gradle.internal.conventions.LicensingPlugin'
53+
}
54+
buildTools {
55+
id = 'elasticsearch.build-tools'
56+
implementationClass = 'org.elasticsearch.gradle.internal.conventions.BuildToolsConventionsPlugin'
57+
}
58+
versions {
59+
id = 'elasticsearch.versions'
60+
implementationClass = 'org.elasticsearch.gradle.internal.conventions.VersionPropertiesPlugin'
61+
}
62+
formatting {
63+
id = 'elasticsearch.formatting'
64+
implementationClass = 'org.elasticsearch.gradle.internal.conventions.precommit.FormattingPrecommitPlugin'
65+
}
66+
}
6767
}
6868

6969
repositories {
70-
mavenCentral()
71-
gradlePluginPortal()
70+
mavenCentral()
71+
gradlePluginPortal()
7272
}
7373

7474
dependencies {
75-
api buildLibs.maven.model
76-
api buildLibs.shadow.plugin
77-
api buildLibs.apache.rat
78-
compileOnly buildLibs.checkstyle
79-
constraints {
80-
api("org.eclipse.platform:org.eclipse.osgi:3.18.300") {
81-
because("Use the same version as we do in spotless gradle plugin at runtime")
82-
}
83-
}
84-
api(buildLibs.spotless.plugin) {
85-
exclude module: "groovy-xml"
75+
api buildLibs.maven.model
76+
api buildLibs.shadow.plugin
77+
api buildLibs.apache.rat
78+
api buildLibs.nmcp
79+
compileOnly buildLibs.checkstyle
80+
constraints {
81+
api("org.eclipse.platform:org.eclipse.osgi:3.18.300") {
82+
because("Use the same version as we do in spotless gradle plugin at runtime")
8683
}
84+
}
85+
api(buildLibs.spotless.plugin) {
86+
exclude module: "groovy-xml"
87+
}
8788
}
8889

8990
project.getPlugins().withType(JavaBasePlugin.class) {
90-
java.getModularity().getInferModulePath().set(false);
91-
eclipse.getClasspath().getFile().whenMerged { classpath ->
92-
/*
93-
* give each source folder a unique corresponding output folder
94-
* outside of the usual `build` folder. We can't put the build
95-
* in the usual build folder because eclipse becomes *very* sad
96-
* if we delete it. Which `gradlew clean` does all the time.
97-
*/
98-
classpath.getEntries().findAll{ s -> s instanceof SourceFolder }.eachWithIndex { s, i ->
99-
s.setOutput("out/eclipse" + i)
100-
}
91+
java.getModularity().getInferModulePath().set(false);
92+
eclipse.getClasspath().getFile().whenMerged { classpath ->
93+
/*
94+
* give each source folder a unique corresponding output folder
95+
* outside of the usual `build` folder. We can't put the build
96+
* in the usual build folder because eclipse becomes *very* sad
97+
* if we delete it. Which `gradlew clean` does all the time.
98+
*/
99+
classpath.getEntries().findAll { s -> s instanceof SourceFolder }.eachWithIndex { s, i ->
100+
s.setOutput("out/eclipse" + i)
101101
}
102+
}
102103
}
103104

104105
tasks.withType(JavaCompile).configureEach {

0 commit comments

Comments
 (0)