Skip to content

Commit 0badf30

Browse files
committed
Merge branch 'master' into batch-settings-update
2 parents dc452c7 + 1017b6a commit 0badf30

File tree

179 files changed

+7131
-693
lines changed

Some content is hidden

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

179 files changed

+7131
-693
lines changed

build-tools-internal/build.gradle

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -202,27 +202,35 @@ configurations {
202202
integTestRuntimeOnly.extendsFrom(testRuntimeOnly)
203203
}
204204
dependencies {
205+
constraints {
206+
api("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.getProperty('jackson')}") {
207+
version {
208+
strictly "${versions.getProperty('jackson')}"
209+
}
210+
because 'We want to use the exact same jackson version we use in production'
211+
}
212+
}
205213
api localGroovy()
206214
api gradleApi()
207215

208216
api "org.elasticsearch:build-conventions:$version"
209217
api "org.elasticsearch.gradle:build-tools:$version"
210218

211-
api 'commons-codec:commons-codec:1.12'
219+
// same version as http client transitive dep
220+
api 'commons-codec:commons-codec:1.11'
212221
api 'org.apache.commons:commons-compress:1.19'
213222
api 'org.apache.ant:ant:1.10.8'
214-
api 'com.netflix.nebula:gradle-extra-configurations-plugin:5.0.1'
215-
api 'com.netflix.nebula:gradle-info-plugin:9.2.0'
223+
api 'com.netflix.nebula:gradle-info-plugin:11.1.0'
216224
api 'org.apache.rat:apache-rat:0.11'
217225
api "net.java.dev.jna:jna:${versions.getProperty('jna')}"
218-
api 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.0.0'
226+
api 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
219227
// for our ide tweaking
220-
api 'gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:0.7'
228+
api 'gradle.plugin.org.jetbrains.gradle.plugin.idea-ext:gradle-idea-ext:1.1.1'
221229
// When upgrading forbidden apis, ensure dependency version is bumped in ThirdPartyPrecommitPlugin as well
222230
api 'de.thetaphi:forbiddenapis:3.2'
223-
api 'com.avast.gradle:gradle-docker-compose-plugin:0.14.0'
231+
api 'com.avast.gradle:gradle-docker-compose-plugin:0.14.13'
224232
api 'org.apache.maven:maven-model:3.6.2'
225-
api 'com.networknt:json-schema-validator:1.0.36'
233+
api 'com.networknt:json-schema-validator:1.0.65'
226234
api "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:${versions.getProperty('jackson')}"
227235
api 'org.ow2.asm:asm:9.2'
228236
api 'org.ow2.asm:asm-tree:9.2'
@@ -231,7 +239,6 @@ dependencies {
231239
compileOnly "com.puppycrawl.tools:checkstyle:${versions.getProperty('checkstyle')}"
232240
runtimeOnly "org.elasticsearch.gradle:reaper:$version"
233241
testImplementation "com.puppycrawl.tools:checkstyle:${versions.getProperty('checkstyle')}"
234-
// testImplementation "junit:junit:${versions.getProperty('junit')}"
235242
testImplementation 'com.github.tomakehurst:wiremock-jre8-standalone:2.23.2'
236243
testImplementation 'org.mockito:mockito-core:1.9.5'
237244
testImplementation "org.hamcrest:hamcrest:${versions.getProperty('hamcrest')}"
@@ -290,4 +297,4 @@ tasks.register("bootstrapPerformanceTests", Copy) {
290297
into('build/performanceTests')
291298
def root = file('..')
292299
filter(ReplaceTokens, tokens: [testGitCommit:GitInfo.gitInfo(root).revision])
293-
}
300+
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import org.elasticsearch.gradle.Architecture;
1111
import org.elasticsearch.gradle.Version;
1212
import org.elasticsearch.gradle.VersionProperties;
13-
import org.jetbrains.annotations.NotNull;
1413

1514
import java.util.ArrayList;
1615
import java.util.Collections;
@@ -284,7 +283,7 @@ public record UnreleasedVersionInfo(Version version, String branch, String gradl
284283
public record VersionPair(Version elasticsearch, Version lucene) implements Comparable<VersionPair> {
285284

286285
@Override
287-
public int compareTo(@NotNull VersionPair o) {
286+
public int compareTo(VersionPair o) {
288287
// For ordering purposes, sort by Elasticsearch version
289288
return this.elasticsearch.compareTo(o.elasticsearch);
290289
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public void execute(Task t) {
187187
SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);
188188
FileCollection mainRuntime = sourceSets.getByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath();
189189
// Add any "shadow" dependencies. These are dependencies that are *not* bundled into the shadow JAR
190-
Configuration shadowConfig = project.getConfigurations().getByName(ShadowBasePlugin.getCONFIGURATION_NAME());
190+
Configuration shadowConfig = project.getConfigurations().getByName(ShadowBasePlugin.CONFIGURATION_NAME);
191191
// Add the shadow JAR artifact itself
192192
FileCollection shadowJar = project.files(project.getTasks().named("shadowJar"));
193193
FileCollection testRuntime = sourceSets.getByName(SourceSet.TEST_SOURCE_SET_NAME).getRuntimeClasspath();

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import org.gradle.api.Project;
2222
import org.gradle.api.plugins.JavaBasePlugin;
2323
import org.gradle.api.provider.ProviderFactory;
24-
import org.jetbrains.annotations.Nullable;
2524

2625
import javax.inject.Inject;
2726

@@ -78,7 +77,6 @@ public void apply(Project project) {
7877
.configureEach(t -> t.finalizedBy(project.getTasks().withType(FixtureStop.class)));
7978
}
8079

81-
@Nullable
8280
private String systemProperty(String propName) {
8381
return providerFactory.systemProperty(propName).forUseAtConfigurationTime().getOrNull();
8482
}

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/transform/skip/Skip.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import org.elasticsearch.gradle.internal.test.rest.transform.RestTestTransformByParentObject;
1919
import org.elasticsearch.gradle.internal.test.rest.transform.RestTestTransformGlobalSetup;
2020
import org.gradle.api.tasks.Input;
21-
import org.jetbrains.annotations.Nullable;
2221

2322
import java.util.Iterator;
2423

@@ -43,7 +42,7 @@ public Skip(String skipReason) {
4342
}
4443

4544
@Override
46-
public ObjectNode transformSetup(@Nullable ObjectNode setupNodeParent) {
45+
public ObjectNode transformSetup(ObjectNode setupNodeParent) {
4746
// only transform the global setup if there is no named test
4847
if (testName.isBlank()) {
4948
ArrayNode setupNode;

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,10 @@ public void execute(Task task) {
108108
maybeSkipTask(dockerSupport, buildFixture);
109109

110110
ComposeExtension composeExtension = project.getExtensions().getByType(ComposeExtension.class);
111-
composeExtension.setUseComposeFiles(Collections.singletonList(DOCKER_COMPOSE_YML));
112-
composeExtension.setRemoveContainers(true);
113-
composeExtension.setExecutable(
114-
project.file("/usr/local/bin/docker-compose").exists() ? "/usr/local/bin/docker-compose" : "/usr/bin/docker-compose"
115-
);
111+
composeExtension.getUseComposeFiles().addAll(Collections.singletonList(DOCKER_COMPOSE_YML));
112+
composeExtension.getRemoveContainers().set(true);
113+
composeExtension.getExecutable()
114+
.set(project.file("/usr/local/bin/docker-compose").exists() ? "/usr/local/bin/docker-compose" : "/usr/bin/docker-compose");
116115

117116
tasks.named("composeUp").configure(t -> {
118117
// Avoid running docker-compose tasks in parallel in CI due to some issues on certain Linux distributions

docs/changelog/81856.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 81856
2+
summary: Allow scaling executors to reject tasks after shutdown
3+
area: Infra/Core
4+
type: enhancement
5+
issues: []

docs/changelog/82833.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 82833
2+
summary: Adjust ILM policy for deprecation logs
3+
area: "Infra/Logging"
4+
type: enhancement
5+
issues: []

docs/reference/analysis/tokenfilters/hunspell-tokenfilter.asciidoc

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ See <<dictionary-stemmers>>.
2424
[[analysis-hunspell-tokenfilter-dictionary-config]]
2525
==== Configure Hunspell dictionaries
2626

27-
By default, Hunspell dictionaries are stored and detected on a dedicated
28-
hunspell directory on the filesystem: `<path.config>/hunspell`. Each dictionary
27+
Hunspell dictionaries are stored and detected on a dedicated
28+
`hunspell` directory on the filesystem: `<$ES_PATH_CONF>/hunspell`. Each dictionary
2929
is expected to have its own directory, named after its associated language and
3030
locale (e.g., `pt_BR`, `en_GB`). This dictionary directory is expected to hold a
3131
single `.aff` and one or more `.dic` files, all of which will automatically be
32-
picked up. For example, assuming the default `<path.config>/hunspell` path
33-
is used, the following directory layout will define the `en_US` dictionary:
32+
picked up. For example, the following directory layout will define the `en_US` dictionary:
3433

3534
[source,txt]
3635
--------------------------------------------------
@@ -47,16 +46,16 @@ Each dictionary can be configured with one setting:
4746
`ignore_case`::
4847
(Static, Boolean)
4948
If true, dictionary matching will be case insensitive. Defaults to `false`.
50-
49+
+
5150
This setting can be configured globally in `elasticsearch.yml` using
5251
`indices.analysis.hunspell.dictionary.ignore_case`.
53-
52+
+
5453
To configure the setting for a specific locale, use the
5554
`indices.analysis.hunspell.dictionary.<locale>.ignore_case` setting (e.g., for
5655
the `en_US` (American English) locale, the setting is
5756
`indices.analysis.hunspell.dictionary.en_US.ignore_case`).
58-
59-
It is also possible to add `settings.yml` file under the dictionary
57+
+
58+
You can also add a `settings.yml` file under the dictionary
6059
directory which holds these settings. This overrides any other `ignore_case`
6160
settings defined in `elasticsearch.yml`.
6261

@@ -67,7 +66,7 @@ The following analyze API request uses the `hunspell` filter to stem
6766
`the foxes jumping quickly` to `the fox jump quick`.
6867

6968
The request specifies the `en_US` locale, meaning that the
70-
`.aff` and `.dic` files in the `<path.config>/hunspell/en_US` directory are used
69+
`.aff` and `.dic` files in the `<$ES_PATH_CONF>/hunspell/en_US` directory are used
7170
for the Hunspell dictionary.
7271

7372
[source,console]
@@ -140,11 +139,8 @@ One or more `.dic` files (e.g, `en_US.dic, my_custom.dic`) to use for the
140139
Hunspell dictionary.
141140
+
142141
By default, the `hunspell` filter uses all `.dic` files in the
143-
`<path.config>/hunspell/<locale>` directory specified using the
144-
`lang`, `language`, or `locale` parameter. To use another directory, the
145-
directory's path must be registered using the
146-
<<indices-analysis-hunspell-dictionary-location,
147-
`indices.analysis.hunspell.dictionary.location`>> setting.
142+
`<$ES_PATH_CONF>/hunspell/<locale>` directory specified using the
143+
`lang`, `language`, or `locale` parameter.
148144

149145
`dedup`::
150146
(Optional, Boolean)
@@ -194,7 +190,7 @@ uses a custom `hunspell` filter, `my_en_US_dict_stemmer`, to configure a new
194190
<<analysis-custom-analyzer,custom analyzer>>.
195191

196192
The `my_en_US_dict_stemmer` filter uses a `locale` of `en_US`, meaning that the
197-
`.aff` and `.dic` files in the `<path.config>/hunspell/en_US` directory are
193+
`.aff` and `.dic` files in the `<$ES_PATH_CONF>/hunspell/en_US` directory are
198194
used. The filter also includes a `dedup` argument of `false`, meaning that
199195
duplicate tokens added from the dictionary are not removed from the filter's
200196
output.
@@ -236,12 +232,3 @@ If `true`, the loading of Hunspell dictionaries is deferred until a dictionary
236232
is used. If `false`, the dictionary directory is checked for dictionaries when
237233
the node starts, and any dictionaries are automatically loaded. Defaults to
238234
`false`.
239-
240-
[[indices-analysis-hunspell-dictionary-location]]
241-
`indices.analysis.hunspell.dictionary.location`::
242-
(Static, string)
243-
Path to a Hunspell dictionary directory. This path must be absolute or
244-
relative to the `config` location.
245-
+
246-
By default, the `<path.config>/hunspell` directory is used, as described in
247-
<<analysis-hunspell-tokenfilter-dictionary-config>>.

docs/reference/cluster/state.asciidoc

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<titleabbrev>Cluster state</titleabbrev>
55
++++
66

7-
Returns metadata about the state of the cluster.
7+
Returns an internal representation of the cluster state for debugging or
8+
diagnostic purposes.
89

910
[[cluster-state-api-request]]
1011
==== {api-request-title}
@@ -20,44 +21,46 @@ Returns metadata about the state of the cluster.
2021
[[cluster-state-api-desc]]
2122
==== {api-description-title}
2223

23-
The cluster state API allows access to metadata representing the state of the
24-
whole cluster. This includes information such as
24+
The _cluster state_ is an internal data structure which keeps track of a
25+
variety of information needed by every node, including:
2526

26-
* the set of nodes in the cluster
27+
* The identity and attributes of the other nodes in the cluster
2728

28-
* all cluster-level settings
29+
* Cluster-wide settings
2930

30-
* information about the indices in the cluster, including their mappings and
31-
settings
31+
* Index metadata, including the mapping and settings for each index
3232

33-
* the locations of all the shards in the cluster.
33+
* The location and status of every shard copy in the cluster
3434

35-
NOTE: The response is an internal representation of the cluster state and its
36-
format may change from version to version. If possible, you should obtain any
37-
information from the cluster state using the other, more stable,
38-
<<cluster,cluster APIs>>.
35+
The elected master node ensures that every node in the cluster has a copy of
36+
the same cluster state. The cluster state API lets you retrieve a
37+
representation of this internal state for debugging or diagnostic purposes. You
38+
may need to consult the {es} source code to determine the precise meaning of
39+
the response.
3940

40-
The response provides the cluster state itself, which can be filtered to only
41-
retrieve the parts of interest as described below.
41+
By default the cluster state API will route requests to the elected master node
42+
since this node is the authoritative source of cluster states. You can also
43+
retrieve the cluster state held on the node handling the API request by adding
44+
the query parameter `?local=true`.
4245

43-
The cluster's `cluster_uuid` is also returned as part of the top-level response,
44-
in addition to the `metadata` section.
46+
{es} may need to expend significant effort to compute a response to this API in
47+
larger clusters, and the response may comprise a very large quantity of data.
48+
If you use this API repeatedly, your cluster may become unstable.
4549

46-
NOTE: While the cluster is still forming, it is possible for the `cluster_uuid`
47-
to be `_na_` as well as the cluster state's version to be `-1`.
48-
49-
By default, the cluster state request is routed to the master node, to ensure
50-
that the latest cluster state is returned. For debugging purposes, you can
51-
retrieve the cluster state local to a particular node by adding `local=true` to
52-
the query string.
50+
[[cluster-state-api-unstable-warning]]
51+
WARNING: The response is a representation of an internal data structure. Its
52+
format is not subject to the same compatibility guarantees as other more stable
53+
APIs and may change from version to version. **Do not query this API using
54+
external monitoring tools.** Instead, obtain the information you require using
55+
other more stable <<cluster,cluster APIs>>.
5356

5457
[[cluster-state-api-path-params]]
5558
==== {api-path-parms-title}
5659

57-
The cluster state contains information about all the indices in the cluster,
58-
including their mappings, as well as templates and other metadata. This means it
59-
can sometimes be quite large. To avoid the need to process all this information
60-
you can request only the part of the cluster state that you need:
60+
The cluster state can sometimes be very large, and {es} may consume significant
61+
resources while computing a response to this API. To reduce the size of the
62+
response, you can request only the part of the cluster state in which you are
63+
interested:
6164

6265
`<metrics>`::
6366
(Optional, string) A comma-separated list of the following options:
@@ -70,7 +73,7 @@ you can request only the part of the cluster state that you need:
7073
Shows the `blocks` part of the response.
7174

7275
`master_node`::
73-
Shows the elected `master_node` part of the response.
76+
Shows the `master_node` part of the response.
7477

7578
`metadata`::
7679
Shows the `metadata` part of the response. If you supply a comma separated

0 commit comments

Comments
 (0)