Skip to content

Commit e2b4ae5

Browse files
committed
Merge branch 'upstream/master' into improve-FilterPathBasedFilter-performance
* upstream/master: (153 commits) [ML] update truncation default & adding field output when input is truncated (elastic#79942) [ML] stop using isAllowedByLicense for model license checks (elastic#79908) [ML] Retain built-in ML roles granting Kibana privileges (elastic#80014) [Transform] remove old mixed cluster BWC layers, not required for 8x (elastic#79927) Increase test timeout for CoordinatorTests testAllSearchesExecuted [Transform] add rolling upgrade tests for upgrade endpoint (elastic#79721) [ML] Update trained model docs for truncate parameter for bert tokenization (elastic#79652) `CoordinatorTests` sometimes needs three term bumps (elastic#79574) [ML] Account for service being triggered twice in tests (elastic#80000) SearchContext: remove unused variable (elastic#79917) Revert "Deprecate resolution loss on date field (elastic#78921)" (elastic#79914) Re-enable GeoIpDownloaderIT#testStartWithNoDatabases() (elastic#79907) Fix SnapshotBasedIndexRecoveryIT#testSeqNoBasedRecoveryIsUsedAfterPrimaryFailOver (elastic#79469) Fix RecoverySourceHandlerTests (elastic#79546) SQL: stabilize SqlSearchPageTimeoutIT (elastic#79928) Wait 3 seconds for the server to reload trust (elastic#79778) Skip automatically preserved request headers when rewriting (elastic#79973) Check whether stdout is a real console (elastic#79882) Convert remote license checker to use LicensedFeature (elastic#79876) Miscellaneous fixes for LDAP SDK v6 upgrade (elastic#79891) ... # Conflicts: # libs/x-content/src/main/java/org/elasticsearch/xcontent/support/filtering/FilterPath.java # libs/x-content/src/test/java/org/elasticsearch/xcontent/support/filtering/FilterPathGeneratorFilteringTests.java # libs/x-content/src/test/java/org/elasticsearch/xcontent/support/filtering/FilterPathTests.java
2 parents 22f5abb + 375fc77 commit e2b4ae5

File tree

10,974 files changed

+453289
-293763
lines changed

Some content is hidden

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

10,974 files changed

+453289
-293763
lines changed

.backportrc.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"upstream": "elastic/elasticsearch",
33
"targetBranchChoices": [
4-
{ "name": "master", "checked": true },
4+
"master",
5+
"8.0",
56
"7.16",
67
"7.15",
78
"7.14",
89
"6.8"
910
],
1011
"targetPRLabels": ["backport"],
1112
"branchLabelMapping": {
12-
"^v8.0.0$": "master",
13-
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
13+
"^v8.1.0$": "master",
14+
"^v(\\d+).(\\d+).\\d+(?:-(?:alpha|beta|rc)\\d+)?$": "$1.$2"
1415
}
1516
}

.ci/bwcVersions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ BWC_VERSION:
4646
- "7.15.2"
4747
- "7.16.0"
4848
- "8.0.0"
49+
- "8.1.0"

.ci/java-versions-aarch64.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# are 'java' or 'openjdk' followed by the major release number.
66

77
ES_BUILD_JAVA=jdk16
8-
ES_RUNTIME_JAVA=jdk16
8+
ES_RUNTIME_JAVA=jdk17

.ci/java-versions-fips.properties

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# This file is used when building pull requests with FIPS enabled
2+
3+
# This .properties file defines the versions of Java with which to
4+
# build and test Elasticsearch for this branch. Valid Java versions
5+
# are 'java' or 'openjdk' followed by the major release number.
6+
7+
ES_BUILD_JAVA=openjdk16
8+
ES_RUNTIME_JAVA=openjdk17

.ci/java-versions.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# are 'java' or 'openjdk' followed by the major release number.
66

77
ES_BUILD_JAVA=openjdk16
8-
ES_RUNTIME_JAVA=java11
8+
ES_RUNTIME_JAVA=openjdk17

.ci/jobs.t/elastic+elasticsearch+multijob+platform-support-arm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
COMPOSE_HTTP_TIMEOUT=120
2424
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
2525
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
26+
JAVA11_HOME=$HOME/.java/jdk11
2627
JAVA15_HOME=$HOME/.java/jdk15
2728
- shell: |
2829
#!/usr/local/bin/runbld --redirect-stderr

.ci/jobs.t/elastic+elasticsearch+multijob+platform-support-darwin.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
properties-content: |
1111
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
1212
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
13+
JAVA11_HOME=$HOME/.java/java11
1314
JAVA15_HOME=$HOME/.java/openjdk15
1415
- shell: |
1516
#!/usr/local/bin/runbld --redirect-stderr

.ci/jobs.t/elastic+elasticsearch+multijob+platform-support-unix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
properties-content: |
3333
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
3434
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
35+
JAVA11_HOME=$HOME/.java/java11
3536
JAVA15_HOME=$HOME/.java/openjdk15
3637
- shell: |
3738
#!/usr/local/bin/runbld --redirect-stderr

.ci/jobs.t/elastic+elasticsearch+multijob+platform-support-windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
properties-content: |
3535
JAVA_HOME=$USERPROFILE\\.java\\$ES_BUILD_JAVA
3636
RUNTIME_JAVA_HOME=$USERPROFILE\\.java\\$ES_RUNTIME_JAVA
37+
JAVA11_HOME=$USERPROFILE\\.java\\java11
3738
JAVA15_HOME=$USERPROFILE\\.java\\openjdk15
3839
- batch: |
3940
del /f /s /q %USERPROFILE%\.gradle\init.d\*.*

.ci/jobs.t/elastic+elasticsearch+periodic+ear.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
properties-content: |
1212
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
1313
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
14+
JAVA11_HOME=$HOME/.java/java11
1415
JAVA15_HOME=$HOME/.java/openjdk15
1516
- shell: |
1617
#!/bin/bash

.ci/jobs.t/elastic+elasticsearch+periodic+release-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
properties-content: |
1212
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
1313
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
14+
JAVA11_HOME=$HOME/.java/java11
1415
JAVA15_HOME=$HOME/.java/openjdk15
1516
- shell: |
1617
#!/usr/local/bin/runbld --redirect-stderr

.ci/jobs.t/elastic+elasticsearch+pull-request+docs-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@
3232
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
3333
- shell: |
3434
#!/usr/local/bin/runbld --redirect-stderr
35-
$WORKSPACE/.ci/scripts/run-gradle.sh -Dignore.tests.seed :docs:check
35+
$WORKSPACE/.ci/scripts/run-gradle.sh -Dignore.tests.seed precommit :docs:check

.ci/jobs.t/elastic+elasticsearch+pull-request+part-1-fips.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828
- '>test-mute'
2929
builders:
3030
- inject:
31-
properties-file: '.ci/java-versions.properties'
31+
# Use FIPS-specific Java versions
32+
properties-file: '.ci/java-versions-fips.properties'
3233
properties-content: |
3334
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
34-
RUNTIME_JAVA_HOME=$HOME/.java/java11
35+
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
3536
JAVA15_HOME=$HOME/.java/openjdk15
3637
- shell: |
3738
#!/usr/local/bin/runbld --redirect-stderr

.ci/jobs.t/elastic+elasticsearch+pull-request+part-2-fips.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828
- '>test-mute'
2929
builders:
3030
- inject:
31-
properties-file: '.ci/java-versions.properties'
31+
# Use FIPS-specific Java versions
32+
properties-file: '.ci/java-versions-fips.properties'
3233
properties-content: |
3334
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
34-
RUNTIME_JAVA_HOME=$HOME/.java/java11
35+
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
3536
JAVA15_HOME=$HOME/.java/openjdk15
3637
- shell: |
3738
#!/usr/local/bin/runbld --redirect-stderr

.ci/jobs.t/elastic+elasticsearch+pull-request+precommit.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
github-hooks: true
1919
status-context: elasticsearch-ci/precommit
2020
cancel-builds-on-update: true
21-
included-regions:
22-
- ^docs/.*
23-
black-list-labels:
21+
white-list-labels:
2422
- '>test-mute'
2523
builders:
2624
- inject:

.ci/matrix-runtime-javas.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,4 @@
66
# or 'openjdk' followed by the major release number.
77

88
ES_RUNTIME_JAVA:
9-
- java11
10-
- openjdk16
11-
- zulu11
12-
- corretto11
13-
- adoptopenjdk11
149
- openjdk17

.ci/templates.t/generic-gradle-unix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
properties-content: |
1111
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
1212
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
13+
JAVA11_HOME=$HOME/.java/java11
1314
JAVA15_HOME=$HOME/.java/openjdk15
1415
- shell: |
1516
#!/usr/local/bin/runbld --redirect-stderr

.ci/templates.t/matrix-gradle-unix.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
properties-content: |
2626
JAVA_HOME=$HOME/.java/$ES_BUILD_JAVA
2727
RUNTIME_JAVA_HOME=$HOME/.java/$ES_RUNTIME_JAVA
28+
JAVA11_HOME=$HOME/.java/java11
2829
JAVA15_HOME=$HOME/.java/openjdk15
2930
- shell: |
3031
#!/usr/local/bin/runbld --redirect-stderr

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@
1717

1818
# Format aggregations and related code (server and x-pack)
1919
d71544976608bdb53fa4d29521fb328e1033ee2f
20+
21+
# Reformatting of whole codebase
22+
12ad399c488f0cc60e19b5e1b29c6d569cb4351a

benchmarks/src/main/java/org/elasticsearch/benchmark/search/fetch/subphase/FetchSourcePhaseBenchmark.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import org.elasticsearch.xcontent.NamedXContentRegistry;
1313
import org.elasticsearch.xcontent.XContentBuilder;
1414
import org.elasticsearch.xcontent.XContentParser;
15+
import org.elasticsearch.xcontent.XContentParserConfiguration;
1516
import org.elasticsearch.xcontent.XContentType;
16-
import org.elasticsearch.xcontent.support.filtering.FilterPath;
1717
import org.openjdk.jmh.annotations.Benchmark;
1818
import org.openjdk.jmh.annotations.BenchmarkMode;
1919
import org.openjdk.jmh.annotations.Fork;
@@ -41,8 +41,7 @@ public class FetchSourcePhaseBenchmark {
4141
private FetchSourceContext fetchContext;
4242
private Set<String> includesSet;
4343
private Set<String> excludesSet;
44-
private FilterPath[] includesFilters;
45-
private FilterPath[] excludesFilters;
44+
private XContentParserConfiguration parserConfig;
4645

4746
@Param({ "tiny", "short", "one_4k_field", "one_4m_field" })
4847
private String source;
@@ -76,8 +75,7 @@ public void setup() throws IOException {
7675
);
7776
includesSet = Set.of(fetchContext.includes());
7877
excludesSet = Set.of(fetchContext.excludes());
79-
includesFilters = FilterPath.compile(Set.of(fetchContext.includes()));
80-
excludesFilters = FilterPath.compile(Set.of(fetchContext.excludes()));
78+
parserConfig = XContentParserConfiguration.EMPTY.withFiltering(includesSet, excludesSet);
8179
}
8280

8381
private BytesReference read300BytesExample() throws IOException {
@@ -102,16 +100,7 @@ public BytesReference filterObjects() throws IOException {
102100
public BytesReference filterXContentOnParser() throws IOException {
103101
BytesStreamOutput streamOutput = new BytesStreamOutput(Math.min(1024, sourceBytes.length()));
104102
XContentBuilder builder = new XContentBuilder(XContentType.JSON.xContent(), streamOutput);
105-
try (
106-
XContentParser parser = XContentType.JSON.xContent()
107-
.createParser(
108-
NamedXContentRegistry.EMPTY,
109-
DeprecationHandler.THROW_UNSUPPORTED_OPERATION,
110-
sourceBytes.streamInput(),
111-
includesFilters,
112-
excludesFilters
113-
)
114-
) {
103+
try (XContentParser parser = XContentType.JSON.xContent().createParser(parserConfig, sourceBytes.streamInput())) {
115104
builder.copyCurrentStructure(parser);
116105
return BytesReference.bytes(builder);
117106
}

0 commit comments

Comments
 (0)