Skip to content

Commit 52bcd4f

Browse files
committed
Merge branch 'main' into skip-on-fail
2 parents cffcca2 + 778ab8f commit 52bcd4f

File tree

362 files changed

+11695
-3545
lines changed

Some content is hidden

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

362 files changed

+11695
-3545
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.15.4", "8.16.0", "8.17.0", "9.0.0"]
59+
BWC_VERSION: ["8.15.5", "8.16.0", "8.17.0", "9.0.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
@@ -272,8 +272,8 @@ steps:
272272
env:
273273
BWC_VERSION: 8.14.3
274274

275-
- label: "{{matrix.image}} / 8.15.4 / packaging-tests-upgrade"
276-
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.4
275+
- label: "{{matrix.image}} / 8.15.5 / packaging-tests-upgrade"
276+
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.15.5
277277
timeout_in_minutes: 300
278278
matrix:
279279
setup:
@@ -286,7 +286,7 @@ steps:
286286
machineType: custom-16-32768
287287
buildDirectory: /dev/shm/bk
288288
env:
289-
BWC_VERSION: 8.15.4
289+
BWC_VERSION: 8.15.5
290290

291291
- label: "{{matrix.image}} / 8.16.0 / packaging-tests-upgrade"
292292
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.0

.buildkite/pipelines/periodic.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ steps:
287287
- signal_reason: agent_stop
288288
limit: 3
289289

290-
- label: 8.15.4 / bwc
291-
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.4#bwcTest
290+
- label: 8.15.5 / bwc
291+
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.15.5#bwcTest
292292
timeout_in_minutes: 300
293293
agents:
294294
provider: gcp
@@ -297,7 +297,7 @@ steps:
297297
buildDirectory: /dev/shm/bk
298298
preemptible: true
299299
env:
300-
BWC_VERSION: 8.15.4
300+
BWC_VERSION: 8.15.5
301301
retry:
302302
automatic:
303303
- exit_status: "-1"
@@ -429,7 +429,7 @@ steps:
429429
setup:
430430
ES_RUNTIME_JAVA:
431431
- openjdk21
432-
BWC_VERSION: ["8.15.4", "8.16.0", "8.17.0", "9.0.0"]
432+
BWC_VERSION: ["8.15.5", "8.16.0", "8.17.0", "9.0.0"]
433433
agents:
434434
provider: gcp
435435
image: family/elasticsearch-ubuntu-2004
@@ -471,7 +471,7 @@ steps:
471471
ES_RUNTIME_JAVA:
472472
- openjdk21
473473
- openjdk23
474-
BWC_VERSION: ["8.15.4", "8.16.0", "8.17.0", "9.0.0"]
474+
BWC_VERSION: ["8.15.5", "8.16.0", "8.17.0", "9.0.0"]
475475
agents:
476476
provider: gcp
477477
image: family/elasticsearch-ubuntu-2004

.ci/bwcVersions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BWC_VERSION:
1414
- "8.12.2"
1515
- "8.13.4"
1616
- "8.14.3"
17-
- "8.15.4"
17+
- "8.15.5"
1818
- "8.16.0"
1919
- "8.17.0"
2020
- "9.0.0"

.ci/dockerOnLinuxExclusions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ sles-15.2
1515
sles-15.3
1616
sles-15.4
1717
sles-15.5
18+
sles-15.6
1819

1920
# These OSes are deprecated and filtered starting with 8.0.0, but need to be excluded
2021
# for PR checks

.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.15.4"
2+
- "8.15.5"
33
- "8.16.0"
44
- "8.17.0"
55
- "9.0.0"

README.asciidoc

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Elasticsearch is a distributed search and analytics engine, scalable data store
44

55
Use cases enabled by Elasticsearch include:
66

7-
* https://www.elastic.co/search-labs/blog/articles/retrieval-augmented-generation-rag[Retrieval Augmented Generation (RAG)]
7+
* https://www.elastic.co/search-labs/blog/articles/retrieval-augmented-generation-rag[Retrieval Augmented Generation (RAG)]
88
* https://www.elastic.co/search-labs/blog/categories/vector-search[Vector search]
99
* Full-text search
1010
* Logs
@@ -17,7 +17,7 @@ Use cases enabled by Elasticsearch include:
1717
To learn more about Elasticsearch's features and capabilities, see our
1818
https://www.elastic.co/products/elasticsearch[product page].
1919

20-
To access information on https://www.elastic.co/search-labs/blog/categories/ml-research[machine learning innovations] and the latest https://www.elastic.co/search-labs/blog/categories/lucene[Lucene contributions from Elastic], more information can be found in https://www.elastic.co/search-labs[Search Labs].
20+
To access information on https://www.elastic.co/search-labs/blog/categories/ml-research[machine learning innovations] and the latest https://www.elastic.co/search-labs/blog/categories/lucene[Lucene contributions from Elastic], more information can be found in https://www.elastic.co/search-labs[Search Labs].
2121

2222
[[get-started]]
2323
== Get started
@@ -27,20 +27,20 @@ https://www.elastic.co/cloud/as-a-service[Elasticsearch Service on Elastic
2727
Cloud].
2828

2929
If you prefer to install and manage Elasticsearch yourself, you can download
30-
the latest version from
30+
the latest version from
3131
https://www.elastic.co/downloads/elasticsearch[elastic.co/downloads/elasticsearch].
3232

3333
=== Run Elasticsearch locally
3434

35-
////
35+
////
3636
IMPORTANT: This content is replicated in the Elasticsearch repo. See `run-elasticsearch-locally.asciidoc`.
3737
Ensure both files are in sync.
3838
3939
https://github.com/elastic/start-local is the source of truth.
40-
////
40+
////
4141

4242
[WARNING]
43-
====
43+
====
4444
DO NOT USE THESE INSTRUCTIONS FOR PRODUCTION DEPLOYMENTS.
4545
4646
This setup is intended for local development and testing only.
@@ -93,20 +93,20 @@ Use this key to connect to Elasticsearch with a https://www.elastic.co/guide/en/
9393
From the `elastic-start-local` folder, check the connection to Elasticsearch using `curl`:
9494

9595
[source,sh]
96-
----
96+
----
9797
source .env
9898
curl $ES_LOCAL_URL -H "Authorization: ApiKey ${ES_LOCAL_API_KEY}"
9999
----
100100
// NOTCONSOLE
101101

102102
=== Send requests to Elasticsearch
103103

104-
You send data and other requests to Elasticsearch through REST APIs.
105-
You can interact with Elasticsearch using any client that sends HTTP requests,
104+
You send data and other requests to Elasticsearch through REST APIs.
105+
You can interact with Elasticsearch using any client that sends HTTP requests,
106106
such as the https://www.elastic.co/guide/en/elasticsearch/client/index.html[Elasticsearch
107-
language clients] and https://curl.se[curl].
107+
language clients] and https://curl.se[curl].
108108

109-
==== Using curl
109+
==== Using curl
110110

111111
Here's an example curl command to create a new Elasticsearch index, using basic auth:
112112

@@ -149,19 +149,19 @@ print(client.info())
149149

150150
==== Using the Dev Tools Console
151151

152-
Kibana's developer console provides an easy way to experiment and test requests.
152+
Kibana's developer console provides an easy way to experiment and test requests.
153153
To access the console, open Kibana, then go to **Management** > **Dev Tools**.
154154

155155
**Add data**
156156

157-
You index data into Elasticsearch by sending JSON objects (documents) through the REST APIs.
158-
Whether you have structured or unstructured text, numerical data, or geospatial data,
159-
Elasticsearch efficiently stores and indexes it in a way that supports fast searches.
157+
You index data into Elasticsearch by sending JSON objects (documents) through the REST APIs.
158+
Whether you have structured or unstructured text, numerical data, or geospatial data,
159+
Elasticsearch efficiently stores and indexes it in a way that supports fast searches.
160160

161161
For timestamped data such as logs and metrics, you typically add documents to a
162162
data stream made up of multiple auto-generated backing indices.
163163

164-
To add a single document to an index, submit an HTTP post request that targets the index.
164+
To add a single document to an index, submit an HTTP post request that targets the index.
165165

166166
----
167167
POST /customer/_doc/1
@@ -171,19 +171,19 @@ POST /customer/_doc/1
171171
}
172172
----
173173

174-
This request automatically creates the `customer` index if it doesn't exist,
175-
adds a new document that has an ID of 1, and
174+
This request automatically creates the `customer` index if it doesn't exist,
175+
adds a new document that has an ID of 1, and
176176
stores and indexes the `firstname` and `lastname` fields.
177177

178-
The new document is available immediately from any node in the cluster.
178+
The new document is available immediately from any node in the cluster.
179179
You can retrieve it with a GET request that specifies its document ID:
180180

181181
----
182182
GET /customer/_doc/1
183183
----
184184

185185
To add multiple documents in one request, use the `_bulk` API.
186-
Bulk data must be newline-delimited JSON (NDJSON).
186+
Bulk data must be newline-delimited JSON (NDJSON).
187187
Each line must end in a newline character (`\n`), including the last line.
188188

189189
----
@@ -200,15 +200,15 @@ PUT customer/_bulk
200200

201201
**Search**
202202

203-
Indexed documents are available for search in near real-time.
204-
The following search matches all customers with a first name of _Jennifer_
203+
Indexed documents are available for search in near real-time.
204+
The following search matches all customers with a first name of _Jennifer_
205205
in the `customer` index.
206206

207207
----
208208
GET customer/_search
209209
{
210210
"query" : {
211-
"match" : { "firstname": "Jennifer" }
211+
"match" : { "firstname": "Jennifer" }
212212
}
213213
}
214214
----
@@ -223,9 +223,9 @@ data streams, or index aliases.
223223

224224
. Go to **Management > Stack Management > Kibana > Data Views**.
225225
. Select **Create data view**.
226-
. Enter a name for the data view and a pattern that matches one or more indices,
227-
such as _customer_.
228-
. Select **Save data view to Kibana**.
226+
. Enter a name for the data view and a pattern that matches one or more indices,
227+
such as _customer_.
228+
. Select **Save data view to Kibana**.
229229

230230
To start exploring, go to **Analytics > Discover**.
231231

@@ -254,11 +254,6 @@ To build a distribution for another platform, run the related command:
254254
./gradlew :distribution:archives:windows-zip:assemble
255255
----
256256

257-
To build distributions for all supported platforms, run:
258-
----
259-
./gradlew assemble
260-
----
261-
262257
Distributions are output to `distribution/archives`.
263258

264259
To run the test suite, see xref:TESTING.asciidoc[TESTING].
@@ -281,7 +276,7 @@ The https://github.com/elastic/elasticsearch-labs[`elasticsearch-labs`] repo con
281276
[[contribute]]
282277
== Contribute
283278

284-
For contribution guidelines, see xref:CONTRIBUTING.md[CONTRIBUTING].
279+
For contribution guidelines, see xref:CONTRIBUTING.md[CONTRIBUTING].
285280

286281
[[questions]]
287282
== Questions? Problems? Suggestions?
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
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.indices.resolution;
11+
12+
import org.elasticsearch.action.IndicesRequest;
13+
import org.elasticsearch.action.support.IndicesOptions;
14+
import org.elasticsearch.cluster.ClusterName;
15+
import org.elasticsearch.cluster.ClusterState;
16+
import org.elasticsearch.cluster.metadata.DataStream;
17+
import org.elasticsearch.cluster.metadata.IndexMetadata;
18+
import org.elasticsearch.cluster.metadata.IndexNameExpressionResolver;
19+
import org.elasticsearch.cluster.metadata.Metadata;
20+
import org.elasticsearch.common.settings.Settings;
21+
import org.elasticsearch.common.util.concurrent.ThreadContext;
22+
import org.elasticsearch.index.Index;
23+
import org.elasticsearch.index.IndexVersion;
24+
import org.elasticsearch.indices.SystemIndices;
25+
import org.openjdk.jmh.annotations.Benchmark;
26+
import org.openjdk.jmh.annotations.BenchmarkMode;
27+
import org.openjdk.jmh.annotations.Fork;
28+
import org.openjdk.jmh.annotations.Mode;
29+
import org.openjdk.jmh.annotations.OutputTimeUnit;
30+
import org.openjdk.jmh.annotations.Param;
31+
import org.openjdk.jmh.annotations.Scope;
32+
import org.openjdk.jmh.annotations.Setup;
33+
import org.openjdk.jmh.annotations.State;
34+
35+
import java.util.ArrayList;
36+
import java.util.List;
37+
import java.util.concurrent.TimeUnit;
38+
39+
@State(Scope.Benchmark)
40+
@Fork(3)
41+
@BenchmarkMode(Mode.AverageTime)
42+
@OutputTimeUnit(TimeUnit.MILLISECONDS)
43+
@SuppressWarnings("unused") // invoked by benchmarking framework
44+
public class IndexNameExpressionResolverBenchmark {
45+
46+
private static final String DATA_STREAM_PREFIX = "my-ds-";
47+
private static final String INDEX_PREFIX = "my-index-";
48+
49+
@Param(
50+
{
51+
// # data streams | # indices
52+
" 1000| 100",
53+
" 5000| 500",
54+
" 10000| 1000" }
55+
)
56+
public String resourceMix = "100|10";
57+
58+
@Setup
59+
public void setUp() {
60+
final String[] params = resourceMix.split("\\|");
61+
62+
int numDataStreams = toInt(params[0]);
63+
int numIndices = toInt(params[1]);
64+
65+
Metadata.Builder mb = Metadata.builder();
66+
String[] indices = new String[numIndices + numDataStreams * (numIndices + 1)];
67+
int position = 0;
68+
for (int i = 1; i <= numIndices; i++) {
69+
String indexName = INDEX_PREFIX + i;
70+
createIndexMetadata(indexName, mb);
71+
indices[position++] = indexName;
72+
}
73+
74+
for (int i = 1; i <= numDataStreams; i++) {
75+
String dataStreamName = DATA_STREAM_PREFIX + i;
76+
List<Index> backingIndices = new ArrayList<>();
77+
for (int j = 1; j <= numIndices; j++) {
78+
String backingIndexName = DataStream.getDefaultBackingIndexName(dataStreamName, j);
79+
backingIndices.add(createIndexMetadata(backingIndexName, mb).getIndex());
80+
indices[position++] = backingIndexName;
81+
}
82+
indices[position++] = dataStreamName;
83+
mb.put(DataStream.builder(dataStreamName, backingIndices).build());
84+
}
85+
int mid = indices.length / 2;
86+
clusterState = ClusterState.builder(ClusterName.DEFAULT).metadata(mb).build();
87+
resolver = new IndexNameExpressionResolver(new ThreadContext(Settings.EMPTY), new SystemIndices(List.of()));
88+
indexListRequest = new Request(IndicesOptions.lenientExpandOpenHidden(), indices);
89+
starRequest = new Request(IndicesOptions.lenientExpandOpenHidden(), "*");
90+
String[] mixed = indices.clone();
91+
mixed[mid] = "my-*";
92+
mixedRequest = new Request(IndicesOptions.lenientExpandOpenHidden(), mixed);
93+
}
94+
95+
private IndexMetadata createIndexMetadata(String indexName, Metadata.Builder mb) {
96+
IndexMetadata indexMetadata = IndexMetadata.builder(indexName)
97+
.settings(Settings.builder().put(IndexMetadata.SETTING_VERSION_CREATED, IndexVersion.current()))
98+
.numberOfShards(1)
99+
.numberOfReplicas(0)
100+
.build();
101+
mb.put(indexMetadata, false);
102+
return indexMetadata;
103+
}
104+
105+
private IndexNameExpressionResolver resolver;
106+
private ClusterState clusterState;
107+
private Request starRequest;
108+
private Request indexListRequest;
109+
private Request mixedRequest;
110+
111+
@Benchmark
112+
public String[] resolveResourcesListToConcreteIndices() {
113+
return resolver.concreteIndexNames(clusterState, indexListRequest);
114+
}
115+
116+
@Benchmark
117+
public String[] resolveAllStarToConcreteIndices() {
118+
return resolver.concreteIndexNames(clusterState, starRequest);
119+
}
120+
121+
@Benchmark
122+
public String[] resolveMixedConcreteIndices() {
123+
return resolver.concreteIndexNames(clusterState, mixedRequest);
124+
}
125+
126+
private int toInt(String v) {
127+
return Integer.parseInt(v.trim());
128+
}
129+
130+
record Request(IndicesOptions indicesOptions, String... indices) implements IndicesRequest {
131+
132+
}
133+
}

0 commit comments

Comments
 (0)