Skip to content

Smarter field caps with subscribable listener (#116755)#118063

Merged
elasticsearchmachine merged 2 commits intoelastic:8.xfrom
astefan:116755_8x_backport
Dec 5, 2024
Merged

Smarter field caps with subscribable listener (#116755)#118063
elasticsearchmachine merged 2 commits intoelastic:8.xfrom
astefan:116755_8x_backport

Conversation

@astefan
Copy link
Contributor

@astefan astefan commented Dec 5, 2024

This change is two fold:

refactors EsqlSession to use (hopefully) a more readable and manageable series of async calls that start with pre-analysis of enrich policies, regular indices, lookup indices and end with verification of the analyzed logical plan of the query. It's changing the nested calls using ActionListeners to a "flat" series of steps using SubscribableListener
in case of VerificationException being thrown in the verification step (following the analysis of the logical plan) and given a REST request filter was used, it removes the filter and retries the analysis. Assuming the first call to IndexResolver using the filter (and implicitly to _field_caps call where the filter is being used, as well) fails, it's retries the _field_caps call without a filter.
There is a leftover task (to be addressed in a separate PR) that should add tests in CCS scenarios: #118054

Addresses #115053
Backport of #116755

@astefan astefan added >enhancement backport auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Analytics/ES|QL AKA ESQL ES|QL-ui Impacts ES|QL UI v9.0.0 v8.18.0 labels Dec 5, 2024
@elasticsearchmachine elasticsearchmachine merged commit dfbd526 into elastic:8.x Dec 5, 2024
@astefan astefan deleted the 116755_8x_backport branch December 5, 2024 13:29
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-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >enhancement ES|QL-ui Impacts ES|QL UI v8.18.0 v9.0.0

2 participants