Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report failures on partial results #124823

Merged
merged 9 commits into from
Mar 14, 2025
Merged

Conversation

smalyshev
Copy link
Contributor

When there are partial failures, ExecutionInfo would always produce _clusters/details/* which contains info about clusters that failed.

@elasticsearchmachine
Copy link
Collaborator

Hi @smalyshev, I've created a changelog YAML for you.

@smalyshev smalyshev requested a review from quux00 March 13, 2025 22:24
@smalyshev smalyshev marked this pull request as ready for review March 13, 2025 22:26
@elasticsearchmachine elasticsearchmachine added Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch labels Mar 13, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-search-foundations (Team:Search Foundations)

@smalyshev smalyshev requested a review from dnhatn March 14, 2025 00:29
@@ -143,7 +144,27 @@ protected static void assertClusterMetadataInResponse(EsqlQueryResponse resp, bo
assertThat((int) inner.get("total"), equalTo(numClusters));
assertTrue(inner.containsKey("details"));
} else {
assertNull(clusters);
final Object partial = esqlResponseAsMap.get("is_partial");
if (partial != null && (Boolean) partial) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any tests that exercise this new assertion path?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipped is partial too, so all results with skipped clusters would go this route.

@quux00
Copy link
Contributor

quux00 commented Mar 14, 2025

We will also need to update the API docs. For example for 8.19, we need to update: https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html, which could be done in this PR.

And we'll also need to update elasticsearch-specification for 9.x docs. But there, it's more murky, but you could update the files in this PR. We should check with the client/devtools team if they are going to update the ES|QL response object spec to allow us to document this information.

@smalyshev
Copy link
Contributor Author

For example for 8.19, we need to update: https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html, which could be done in this PR.

@quux00 I don't think so since these asciidocs no longer exist on main branch, so we'd need separate PR for 8.x only to update this.

@quux00
Copy link
Contributor

quux00 commented Mar 14, 2025

@quux00 I don't think so since these asciidocs no longer exist on main branch, so we'd need separate PR for 8.x only to update this.

You probably have to check out the 8.x branch and do it there. That's worth doing since 8.19 is a GA for ES|QL CCS and many customers will likely be using that version for years to come.

Copy link
Contributor

@quux00 quux00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We'll do the docs changes in follow-on PRs.
Thanks for driving this to completion Stas!

@smalyshev smalyshev merged commit 0e6d6f4 into elastic:main Mar 14, 2025
17 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 124823

@smalyshev
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Questions ?

Please refer to the Backport tool documentation

smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Mar 14, 2025
* Report failures on partial results

(cherry picked from commit 0e6d6f4)

# Conflicts:
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlExecutionInfo.java
#	x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/action/EsqlQueryResponse.java
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Mar 14, 2025
* Report failures on partial results

(cherry picked from commit 0e6d6f4)
smalyshev added a commit to smalyshev/elasticsearch that referenced this pull request Mar 14, 2025
* Report failures on partial results

(cherry picked from commit 0e6d6f4)
elasticsearchmachine pushed a commit that referenced this pull request Mar 14, 2025
* Report failures on partial results

(cherry picked from commit 0e6d6f4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >enhancement :Search Foundations/CCS Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch v8.19.0 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants