Skip to content

Commit 11bd0f0

Browse files
committed
Merge branch 'main' into limit_concurrent_node_requests
2 parents b2a66a2 + 152d086 commit 11bd0f0

File tree

134 files changed

+775
-858
lines changed

Some content is hidden

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

134 files changed

+775
-858
lines changed

build-tools-internal/src/main/groovy/elasticsearch.build-scan.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ develocity {
133133
}
134134
} else {
135135
tag 'LOCAL'
136-
if (providers.systemProperty('idea.active').present) {
136+
if (System.getProperty('idea.active') == 'true') {
137137
tag 'IDEA'
138138
}
139139
}

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Docs live in **three places**:
1717

1818
1. **Reference content** lives in this repo. This covers low-level stuff like settings and configuration information that is tightly coupled to code.
1919
- 👩🏽‍💻 **Engineers** own the bulk of this content.
20-
2. **API reference docs** live in the [Elasticsearch specification](https://github.com/elastic/elasticsearch-specification)
20+
2. **API reference docs** live in the [Elasticsearch specification](https://github.com/elastic/elasticsearch-specification/blob/main/README.md#how-to-generate-the-openapi-representation)
2121
- This is where you need to update API docs published in the [new API docs system](https://www.elastic.co/docs/api/doc/elasticsearch/v8/)
2222
- 👩🏽‍💻 **Engineers** own this content.
2323
3. **Narrative, overview, and conceptual content** mostly lives in the [`docs-content`](https://github.com/elastic/docs-content/) repo.
@@ -106,4 +106,4 @@ This allows slightly more expressive testing of the snippets. Since that syntax
106106
% TEST[s/\n$/\nstartyaml\n - compare_analyzers: {index: thai_example, first: thai, second: rebuilt_thai}\nendyaml\n/]
107107
```
108108

109-
Any place you can use json you can use elements like `$body.path.to.thing` which is replaced on the fly with the contents of the thing at `path.to.thing` in the last response.
109+
Any place you can use json you can use elements like `$body.path.to.thing` which is replaced on the fly with the contents of the thing at `path.to.thing` in the last response.

docs/changelog/122615.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pr: 122615
2+
summary: Enable synthetic recovery source by default when synthetic source is enabled.
3+
Using synthetic recovery source significantly improves indexing performance compared
4+
to regular recovery source.
5+
area: Mapping
6+
type: enhancement
7+
issues:
8+
- 116726

docs/reference/ingestion-tools/search-connectors/es-connectors-servicenow.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,12 @@ The ServiceNow connector supports roles for access control lists (ACLs) to enabl
205205

206206
For services other than these defaults, the connector iterates over access controls with `read` operations and finds the respective roles for those services.
207207

208+
:::{important}
209+
The ServiceNow connector applies access control at the service (table) level. This means documents within a given ServiceNow table share the same access control settings. Users with permission to a table can access all documents from that table in Elasticsearch.
210+
:::
211+
208212
::::{note}
209213
The ServiceNow connector does not support scripted and conditional permissions.
210-
211214
::::
212215

213216

modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/FieldCapsRankFeatureTests.java

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package org.elasticsearch.index.mapper.extras;
1111

1212
import org.elasticsearch.action.fieldcaps.FieldCapabilities;
13+
import org.elasticsearch.action.fieldcaps.FieldCapabilitiesBuilder;
1314
import org.elasticsearch.action.fieldcaps.FieldCapabilitiesResponse;
1415
import org.elasticsearch.action.support.ActiveShardCount;
1516
import org.elasticsearch.plugins.Plugin;
@@ -19,7 +20,6 @@
1920

2021
import java.util.ArrayList;
2122
import java.util.Collection;
22-
import java.util.Collections;
2323
import java.util.Map;
2424

2525
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
@@ -59,10 +59,7 @@ public void testRankFeatureInIndex() {
5959
Map<String, FieldCapabilities> fooRankField = response.getField("fooRank");
6060
assertEquals(1, fooRankField.size());
6161
assertThat(fooRankField, Matchers.hasKey("rank_feature"));
62-
assertEquals(
63-
new FieldCapabilities("fooRank", "rank_feature", false, true, false, null, null, null, Collections.emptyMap()),
64-
fooRankField.get("rank_feature")
65-
);
62+
assertEquals(fieldCapabilities("fooRank"), fooRankField.get("rank_feature"));
6663
}
6764

6865
public void testRankFeatureInIndexAfterRestart() throws Exception {
@@ -79,10 +76,7 @@ public void testRankFeatureInIndexAfterRestart() throws Exception {
7976
Map<String, FieldCapabilities> fooRankField = response.getField("fooRank");
8077
assertEquals(1, fooRankField.size());
8178
assertThat(fooRankField, Matchers.hasKey("rank_feature"));
82-
assertEquals(
83-
new FieldCapabilities("fooRank", "rank_feature", false, true, false, null, null, null, Collections.emptyMap()),
84-
fooRankField.get("rank_feature")
85-
);
79+
assertEquals(fieldCapabilities("fooRank"), fooRankField.get("rank_feature"));
8680
}
8781

8882
public void testAllRankFeatureReturnedIfOneIsPresent() {
@@ -98,18 +92,16 @@ public void testAllRankFeatureReturnedIfOneIsPresent() {
9892
Map<String, FieldCapabilities> fooRankField = response.getField("fooRank");
9993
assertEquals(1, fooRankField.size());
10094
assertThat(fooRankField, Matchers.hasKey("rank_feature"));
101-
assertEquals(
102-
new FieldCapabilities("fooRank", "rank_feature", false, true, false, null, null, null, Collections.emptyMap()),
103-
fooRankField.get("rank_feature")
104-
);
95+
assertEquals(fieldCapabilities("fooRank"), fooRankField.get("rank_feature"));
10596
assertThat(response.get(), Matchers.hasKey("barRank"));
10697
// Check the capabilities for the 'barRank' field.
10798
Map<String, FieldCapabilities> barRankField = response.getField("barRank");
10899
assertEquals(1, barRankField.size());
109100
assertThat(barRankField, Matchers.hasKey("rank_feature"));
110-
assertEquals(
111-
new FieldCapabilities("barRank", "rank_feature", false, true, false, null, null, null, Collections.emptyMap()),
112-
barRankField.get("rank_feature")
113-
);
101+
assertEquals(fieldCapabilities("barRank"), barRankField.get("rank_feature"));
102+
}
103+
104+
private static FieldCapabilities fieldCapabilities(String fieldName) {
105+
return new FieldCapabilitiesBuilder(fieldName, "rank_feature").isAggregatable(false).build();
114106
}
115107
}

muted-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ tests:
130130
issue: https://github.com/elastic/elasticsearch/issues/118914
131131
- class: org.elasticsearch.xpack.security.authc.ldap.ActiveDirectoryRunAsIT
132132
issue: https://github.com/elastic/elasticsearch/issues/115727
133-
- class: org.elasticsearch.index.mapper.AbstractShapeGeometryFieldMapperTests
134-
method: testCartesianBoundsBlockLoader
135-
issue: https://github.com/elastic/elasticsearch/issues/119201
136133
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
137134
method: test {p0=transform/transforms_start_stop/Test start/stop/start transform}
138135
issue: https://github.com/elastic/elasticsearch/issues/119508
@@ -266,9 +263,6 @@ tests:
266263
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
267264
method: test {yaml=reference/snapshot-restore/apis/get-snapshot-api/line_488}
268265
issue: https://github.com/elastic/elasticsearch/issues/121611
269-
- class: org.elasticsearch.index.mapper.ShapeGeometryFieldMapperTests
270-
method: testCartesianBoundsBlockLoader
271-
issue: https://github.com/elastic/elasticsearch/issues/122661
272266
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
273267
method: test {yaml=reference/snapshot-restore/apis/get-snapshot-api/line_408}
274268
issue: https://github.com/elastic/elasticsearch/issues/122681
@@ -339,6 +333,9 @@ tests:
339333
- class: org.elasticsearch.smoketest.MlWithSecurityIT
340334
method: test {yaml=ml/3rd_party_deployment/Test start deployment fails while model download in progress}
341335
issue: https://github.com/elastic/elasticsearch/issues/120814
336+
- class: org.elasticsearch.test.apmintegration.MetricsApmIT
337+
method: testApmIntegration
338+
issue: https://github.com/elastic/elasticsearch/issues/124106
342339

343340
# Examples:
344341
#

plugins/discovery-ec2/build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,12 @@ esplugin.bundleSpec.from('config/discovery-ec2') {
4646
}
4747

4848
tasks.register("writeTestJavaPolicy") {
49+
boolean inFips = buildParams.inFipsJvm
50+
inputs.property("inFipsJvm", inFips)
51+
final File javaPolicy = new File(layout.buildDirectory.asFile.get(), "tmp/java.policy")
52+
outputs.file(javaPolicy)
4953
doLast {
50-
final File tmp = file("${buildDir}/tmp")
51-
if (tmp.exists() == false && tmp.mkdirs() == false) {
52-
throw new GradleException("failed to create temporary directory [${tmp}]")
53-
}
54-
final File javaPolicy = file("${tmp}/java.policy")
55-
if (buildParams.inFipsJvm) {
54+
if (inFips) {
5655
javaPolicy.write(
5756
[
5857
"grant {",
@@ -95,9 +94,9 @@ tasks.withType(Test).configureEach {
9594
// this is needed to manipulate com.amazonaws.sdk.ec2MetadataServiceEndpointOverride system property
9695
// it is better rather disable security manager at all with `systemProperty 'tests.security.manager', 'false'`
9796
if (buildParams.inFipsJvm){
98-
nonInputProperties.systemProperty 'java.security.policy', "=file://${buildDir}/tmp/java.policy"
97+
nonInputProperties.systemProperty 'java.security.policy', "=file://${layout.buildDirectory.asFile.get()}/tmp/java.policy"
9998
} else {
100-
nonInputProperties.systemProperty 'java.security.policy', "file://${buildDir}/tmp/java.policy"
99+
nonInputProperties.systemProperty 'java.security.policy', "file://${layout.buildDirectory.asFile.get()}/tmp/java.policy"
101100
}
102101
}
103102

plugins/examples/security-authorization-engine/src/main/java/org/elasticsearch/example/CustomAuthorizationEngine.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package org.elasticsearch.example;
1111

1212
import org.elasticsearch.action.ActionListener;
13+
import org.elasticsearch.action.support.SubscribableListener;
1314
import org.elasticsearch.cluster.metadata.IndexAbstraction;
1415
import org.elasticsearch.cluster.metadata.ProjectMetadata;
1516
import org.elasticsearch.xpack.core.security.action.user.GetUserPrivilegesResponse;
@@ -86,14 +87,14 @@ public void authorizeClusterAction(RequestInfo requestInfo, AuthorizationInfo au
8687
}
8788

8889
@Override
89-
public void authorizeIndexAction(
90+
SubscribableListener<IndexAuthorizationResult> void authorizeIndexAction(
9091
RequestInfo requestInfo,
9192
AuthorizationInfo authorizationInfo,
9293
AsyncSupplier<ResolvedIndices> indicesAsyncSupplier,
93-
ProjectMetadata project,
94-
ActionListener<IndexAuthorizationResult> listener
94+
ProjectMetadata project
9595
) {
9696
if (isSuperuser(requestInfo.getAuthentication().getEffectiveSubject().getUser())) {
97+
ActionListener<IndexAuthorizationResult> listener = new SubscribableListener<>();
9798
indicesAsyncSupplier.getAsync(ActionListener.wrap(resolvedIndices -> {
9899
Map<String, IndexAccessControl> indexAccessControlMap = new HashMap<>();
99100
for (String name : resolvedIndices.getLocal()) {
@@ -103,8 +104,9 @@ public void authorizeIndexAction(
103104
new IndicesAccessControl(true, Collections.unmodifiableMap(indexAccessControlMap));
104105
listener.onResponse(new IndexAuthorizationResult(indicesAccessControl));
105106
}, listener::onFailure));
107+
return listener;
106108
} else {
107-
listener.onResponse(new IndexAuthorizationResult(IndicesAccessControl.DENIED));
109+
return SubscribableListener.succcess(new IndexAuthorizationResult(IndicesAccessControl.DENIED));
108110
}
109111
}
110112

qa/smoke-test-multinode/src/yamlRestTest/java/org/elasticsearch/smoketest/SmokeTestMultiNodeClientYamlTestSuiteIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public class SmokeTestMultiNodeClientYamlTestSuiteIT extends ESClientYamlSuiteTe
3636
.node(0, n -> n.setting("node.roles", "[master,data,ml,remote_cluster_client,transform]"))
3737
.feature(FeatureFlag.TIME_SERIES_MODE)
3838
.feature(FeatureFlag.SUB_OBJECTS_AUTO_ENABLED)
39-
.feature(FeatureFlag.INDEX_RECOVERY_USE_SYNTHETIC_SOURCE)
4039
.feature(FeatureFlag.DOC_VALUES_SKIPPER)
4140
.build();
4241

rest-api-spec/src/yamlRestTest/java/org/elasticsearch/test/rest/ClientYamlTestSuiteIT.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ public class ClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
3636
.module("data-streams")
3737
.feature(FeatureFlag.TIME_SERIES_MODE)
3838
.feature(FeatureFlag.SUB_OBJECTS_AUTO_ENABLED)
39-
.feature(FeatureFlag.INDEX_RECOVERY_USE_SYNTHETIC_SOURCE)
4039
.feature(FeatureFlag.DOC_VALUES_SKIPPER)
4140
.build();
4241

0 commit comments

Comments
 (0)