Skip to content

Conversation

@smalyshev
Copy link
Contributor

@smalyshev smalyshev commented Aug 13, 2025

Recent changes allow us to know better the errors that happened in lookup join resolution, and thus report more specific error instead of a generic one.

This specifically deals with failures in field-caps which are not caused by missing indices - before this patch, they were reported as missing index, which is misleading. Now, they are reported with actual failure exception attached so we can know what actually happened there.

@smalyshev smalyshev requested a review from alex-spies August 13, 2025 19:31
@smalyshev smalyshev marked this pull request as ready for review August 13, 2025 20:26
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Aug 13, 2025
@elasticsearchmachine
Copy link
Collaborator

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

// assertThat(failure.reason(), containsString(simulatedFailure.getMessage()));
assertThat(failure.reason(), containsString("lookup index [values_lookup] is not available in remote cluster [cluster-a]"));
assertThat(failure.reason(), containsString(simulatedFailure.getMessage()));
assertThat(failure.reason(), containsString("lookup failed in remote cluster [cluster-a] for index [values_lookup]"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Prior message looks more specific to me (eg index is not available in remote cluster or no index vs lookup failed in remote cluster sounds like any failue). Does simulatedFailure message cover for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The prior message was wrong - this is the scenario where the index is available, but for some reason (represented by a random error) the mapping can not be fetched from the cluster. So yes, simulatedFailure will represent the real error message - instead of previously misleading message that index is not available where the problem could have been elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Missing index is covered by other tests (in CrossClusterLookupJoinIT.java etc.) this is scenario where there's a general failure that is not identifiable as missing index.

@smalyshev smalyshev requested a review from idegtiarenko August 14, 2025 14:14
@smalyshev smalyshev merged commit e0296d0 into elastic:main Aug 19, 2025
34 checks passed
@smalyshev smalyshev deleted the lookup-error-msg branch August 19, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL >non-issue Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants