Skip to content

Commit

Permalink
Merge branch 'main' into kderusso/sparse-vector-yaml-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
joegallo authored Dec 17, 2024
2 parents b80424e + 5cb2d28 commit 798ee88
Show file tree
Hide file tree
Showing 110 changed files with 3,335 additions and 217 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ steps:
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["8.16.2", "8.17.1", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.3", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
6 changes: 3 additions & 3 deletions .buildkite/pipelines/periodic-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ steps:
env:
BWC_VERSION: 8.15.5

- label: "{{matrix.image}} / 8.16.2 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.2
- label: "{{matrix.image}} / 8.16.3 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.16.3
timeout_in_minutes: 300
matrix:
setup:
Expand All @@ -301,7 +301,7 @@ steps:
machineType: custom-16-32768
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: 8.16.2
BWC_VERSION: 8.16.3

- label: "{{matrix.image}} / 8.17.1 / packaging-tests-upgrade"
command: ./.ci/scripts/packaging-test.sh -Dbwc.checkout.align=true destructiveDistroUpgradeTest.v8.17.1
Expand Down
1 change: 1 addition & 0 deletions .buildkite/pipelines/periodic-platform-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ steps:
image:
- almalinux-8-aarch64
- ubuntu-2004-aarch64
- ubuntu-2404-aarch64
GRADLE_TASK:
- checkPart1
- checkPart2
Expand Down
10 changes: 5 additions & 5 deletions .buildkite/pipelines/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ steps:
- signal_reason: agent_stop
limit: 3

- label: 8.16.2 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.16.2#bwcTest
- label: 8.16.3 / bwc
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true v8.16.3#bwcTest
timeout_in_minutes: 300
agents:
provider: gcp
Expand All @@ -316,7 +316,7 @@ steps:
buildDirectory: /dev/shm/bk
preemptible: true
env:
BWC_VERSION: 8.16.2
BWC_VERSION: 8.16.3
retry:
automatic:
- exit_status: "-1"
Expand Down Expand Up @@ -448,7 +448,7 @@ steps:
setup:
ES_RUNTIME_JAVA:
- openjdk21
BWC_VERSION: ["8.16.2", "8.17.1", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.3", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down Expand Up @@ -490,7 +490,7 @@ steps:
ES_RUNTIME_JAVA:
- openjdk21
- openjdk23
BWC_VERSION: ["8.16.2", "8.17.1", "8.18.0", "9.0.0"]
BWC_VERSION: ["8.16.3", "8.17.1", "8.18.0", "9.0.0"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
Expand Down
2 changes: 1 addition & 1 deletion .ci/bwcVersions
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BWC_VERSION:
- "8.13.4"
- "8.14.3"
- "8.15.5"
- "8.16.2"
- "8.16.3"
- "8.17.1"
- "8.18.0"
- "9.0.0"
2 changes: 1 addition & 1 deletion .ci/snapshotBwcVersions
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
BWC_VERSION:
- "8.16.2"
- "8.16.3"
- "8.17.1"
- "8.18.0"
- "9.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum DockerBase {
// Chainguard based wolfi image with latest jdk
// This is usually updated via renovatebot
// spotless:off
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:1b51ff6dba78c98d3e02b0cd64a8ce3238c7a40408d21e3af12a329d44db6f23",
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:bfdeddb33330a281950c2a54adef991dbbe6a42832bc505d13b11beaf50ae73f",
"-wolfi",
"apk"
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
"Painless",
"REST API",
"Rollup",
"Search",
"System requirement",
"Transform"
]
Expand Down
5 changes: 0 additions & 5 deletions docs/changelog/116358.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions docs/changelog/116388.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 116388
summary: Add support for partial shard results
area: EQL
type: enhancement
issues: []
5 changes: 0 additions & 5 deletions docs/changelog/117153.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog/118380.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions docs/changelog/118671.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pr: 118671
summary: Adjust `random_score` default field to `_seq_no` field
area: Search
type: breaking
issues: []
breaking:
title: Adjust `random_score` default field to `_seq_no` field
area: Search
details: When providing a 'seed' parameter to a 'random_score' function in the 'function_score' query but NOT providing a 'field', the default 'field' is switched from '_id' to '_seq_no'.
impact: The random scoring and ordering may change when providing a 'seed' and not providing a 'field' to a 'random_score' function.
notable: false
21 changes: 21 additions & 0 deletions docs/reference/alias.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -407,3 +407,24 @@ POST _aliases
}
----
// TEST[s/^/PUT my-index-2099.05.06-000001\n/]

[discrete]
[[remove-index]]
=== Remove an index

To remove an index, use the aliases API's `remove_index` action.

[source,console]
----
POST _aliases
{
"actions": [
{
"remove_index": {
"index": "my-index-2099.05.06-000001"
}
}
]
}
----
// TEST[s/^/PUT my-index-2099.05.06-000001\n/]
47 changes: 47 additions & 0 deletions docs/reference/eql/eql-search-api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,53 @@ request that targets only `bar*` still returns an error.
+
Defaults to `true`.

`allow_partial_search_results`::
(Optional, Boolean)

If `false`, the request returns an error if one or more shards involved in the query are unavailable.
+
If `true`, the query is executed only on the available shards, ignoring shard request timeouts and
<<shard-failures,shard failures>>.
+
Defaults to `false`.
+
To override the default for this field, set the
`xpack.eql.default_allow_partial_results` cluster setting to `true`.


[IMPORTANT]
====
You can also specify this value using the `allow_partial_search_results` request body parameter.
If both parameters are specified, only the query parameter is used.
====


`allow_partial_sequence_results`::
(Optional, Boolean)


Used together with `allow_partial_search_results=true`, controls the behavior of sequence queries specifically
(if `allow_partial_search_results=false`, this setting has no effect).
If `true` and if some shards are unavailable, the sequences are calculated on available shards only.
+
If `false` and if some shards are unavailable, the query only returns information about the shard failures,
but no further results.
+
Defaults to `false`.
+
Consider that sequences calculated with `allow_partial_search_results=true` can return incorrect results
(eg. if a <<eql-missing-events, missing event>> clause matches records in unavailable shards)
+
To override the default for this field, set the
`xpack.eql.default_allow_partial_sequence_results` cluster setting to `true`.


[IMPORTANT]
====
You can also specify this value using the `allow_partial_sequence_results` request body parameter.
If both parameters are specified, only the query parameter is used.
====

`ccs_minimize_roundtrips`::
(Optional, Boolean) If `true`, network round-trips between the local and the
remote cluster are minimized when running cross-cluster search (CCS) requests.
Expand Down
6 changes: 4 additions & 2 deletions docs/reference/indices/shard-stores.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@ The API returns the following response:
"attributes": {},
"roles": [...],
"version": "8.10.0",
"min_index_version": 7000099,
"max_index_version": 8100099
"min_index_version": 8000099,
"min_read_only_index_version": 7000099,
"max_index_version": 9004000
},
"allocation_id": "2iNySv_OQVePRX-yaRH_lQ", <4>
"allocation" : "primary|replica|unused" <5>
Expand All @@ -193,6 +194,7 @@ The API returns the following response:
// TESTRESPONSE[s/"roles": \[[^]]*\]/"roles": $body.$_path/]
// TESTRESPONSE[s/"8.10.0"/\$node_version/]
// TESTRESPONSE[s/"min_index_version": 7000099/"min_index_version": $body.$_path/]
// TESTRESPONSE[s/"min_index_version": 7000099/"min_index_version": $body.$_path/]
// TESTRESPONSE[s/"max_index_version": 8100099/"max_index_version": $body.$_path/]


Expand Down
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ tests:
issue: https://github.com/elastic/elasticsearch/issues/115816
- class: org.elasticsearch.xpack.application.connector.ConnectorIndexServiceTests
issue: https://github.com/elastic/elasticsearch/issues/116087
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
method: test {p0=cat.shards/10_basic/Help}
issue: https://github.com/elastic/elasticsearch/issues/116110
- class: org.elasticsearch.xpack.ml.integration.DatafeedJobsRestIT
method: testLookbackWithIndicesOptions
issue: https://github.com/elastic/elasticsearch/issues/116127
Expand Down
3 changes: 3 additions & 0 deletions qa/mixed-cluster/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ excludeList.add('indices.resolve_index/20_resolve_system_index/*')
// Excluded because the error has changed
excludeList.add('aggregations/percentiles_hdr_metric/Negative values test')

// sync_id is removed in 9.0
excludeList.add("cat.shards/10_basic/Help")

def clusterPath = getPath()

buildParams.bwcVersions.withWireCompatible { bwcVersion, baseName ->
Expand Down
10 changes: 10 additions & 0 deletions rest-api-spec/src/main/resources/rest-api-spec/api/eql.search.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@
"type": "time",
"description": "Update the time interval in which the results (partial or final) for this search will be available",
"default": "5d"
},
"allow_partial_search_results": {
"type":"boolean",
"description":"Control whether the query should keep running in case of shard failures, and return partial results",
"default":false
},
"allow_partial_sequence_results": {
"type":"boolean",
"description":"Control whether a sequence query should return partial results or no results at all in case of shard failures. This option has effect only if [allow_partial_search_results] is true.",
"default":false
}
},
"body":{
Expand Down
2 changes: 2 additions & 0 deletions server/src/main/java/org/elasticsearch/TransportVersions.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ static TransportVersion def(int id) {
public static final TransportVersion KNN_QUERY_RESCORE_OVERSAMPLE = def(8_806_00_0);
public static final TransportVersion SEMANTIC_QUERY_LENIENT = def(8_807_00_0);
public static final TransportVersion ESQL_QUERY_BUILDER_IN_SEARCH_FUNCTIONS = def(8_808_00_0);
public static final TransportVersion EQL_ALLOW_PARTIAL_SEARCH_RESULTS = def(8_809_00_0);
public static final TransportVersion NODE_VERSION_INFORMATION_WITH_MIN_READ_ONLY_INDEX_VERSION = def(8_810_00_0);

/*
* STOP! READ THIS FIRST! No, really,
Expand Down
1 change: 1 addition & 0 deletions server/src/main/java/org/elasticsearch/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public class Version implements VersionId<Version>, ToXContentFragment {
public static final Version V_8_16_0 = new Version(8_16_00_99);
public static final Version V_8_16_1 = new Version(8_16_01_99);
public static final Version V_8_16_2 = new Version(8_16_02_99);
public static final Version V_8_16_3 = new Version(8_16_03_99);
public static final Version V_8_17_0 = new Version(8_17_00_99);
public static final Version V_8_17_1 = new Version(8_17_01_99);
public static final Version V_8_18_0 = new Version(8_18_00_99);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.SortedSet;
import java.util.TreeSet;

import static org.elasticsearch.TransportVersions.NODE_VERSION_INFORMATION_WITH_MIN_READ_ONLY_INDEX_VERSION;
import static org.elasticsearch.node.NodeRoleSettings.NODE_ROLES_SETTING;

/**
Expand Down Expand Up @@ -325,7 +326,17 @@ public DiscoveryNode(StreamInput in) throws IOException {
}
}
this.roles = Collections.unmodifiableSortedSet(roles);
versionInfo = new VersionInformation(Version.readVersion(in), IndexVersion.readVersion(in), IndexVersion.readVersion(in));
Version version = Version.readVersion(in);
IndexVersion minIndexVersion = IndexVersion.readVersion(in);
IndexVersion minReadOnlyIndexVersion;
if (in.getTransportVersion().onOrAfter(NODE_VERSION_INFORMATION_WITH_MIN_READ_ONLY_INDEX_VERSION)) {
minReadOnlyIndexVersion = IndexVersion.readVersion(in);
} else {
minReadOnlyIndexVersion = minIndexVersion;

}
IndexVersion maxIndexVersion = IndexVersion.readVersion(in);
versionInfo = new VersionInformation(version, minIndexVersion, minReadOnlyIndexVersion, maxIndexVersion);
if (in.getTransportVersion().onOrAfter(EXTERNAL_ID_VERSION)) {
this.externalId = readStringLiteral.read(in);
} else {
Expand Down Expand Up @@ -360,6 +371,9 @@ public void writeTo(StreamOutput out) throws IOException {
});
Version.writeVersion(versionInfo.nodeVersion(), out);
IndexVersion.writeVersion(versionInfo.minIndexVersion(), out);
if (out.getTransportVersion().onOrAfter(NODE_VERSION_INFORMATION_WITH_MIN_READ_ONLY_INDEX_VERSION)) {
IndexVersion.writeVersion(versionInfo.minReadOnlyIndexVersion(), out);
}
IndexVersion.writeVersion(versionInfo.maxIndexVersion(), out);
if (out.getTransportVersion().onOrAfter(EXTERNAL_ID_VERSION)) {
out.writeString(externalId);
Expand Down Expand Up @@ -478,6 +492,10 @@ public IndexVersion getMinIndexVersion() {
return versionInfo.minIndexVersion();
}

public IndexVersion getMinReadOnlyIndexVersion() {
return versionInfo.minReadOnlyIndexVersion();
}

public IndexVersion getMaxIndexVersion() {
return versionInfo.maxIndexVersion();
}
Expand Down Expand Up @@ -577,6 +595,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
builder.endArray();
builder.field("version", versionInfo.buildVersion().toString());
builder.field("min_index_version", versionInfo.minIndexVersion());
builder.field("min_read_only_index_version", versionInfo.minReadOnlyIndexVersion());
builder.field("max_index_version", versionInfo.maxIndexVersion());
builder.endObject();
return builder;
Expand Down
Loading

0 comments on commit 798ee88

Please sign in to comment.