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

async-search is_partial=true when any shard search fails or times out #98913

Closed

Conversation

quux00
Copy link
Contributor

@quux00 quux00 commented Aug 26, 2023

With the recent addition of per-cluster metadata to the _clusters section of the response for cross-cluster searches (see #97731), the is_partial setting in the async-search response, now acts as a useful summary to end-users that search/aggs data from all shards is potentially incomplete (not all shards fully searched), which could be for one of 3 reasons:

  1. at least one shard was not successfully searched (a PARTIAL search cluster state)
  2. at least one cluster (marked as skip_unavailable=true) was unavailable (or all searches on all shards of that cluster failed), causing the cluster to be marked as SKIPPED
  3. a search on at least one cluster timed out (timed_out=true, resulting in a PARTIAL cluster search status)

This commit changes local-only (non-CCS) searches to behave consistently with cross-cluster searches, namely, if any search on any shard fails or if the search times out, the is_partial flag is set to true.

Closes #98725
Relates #55572

@quux00 quux00 added >bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v8.11.0 labels Aug 26, 2023
@elasticsearchmachine
Copy link
Collaborator

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

@elasticsearchmachine
Copy link
Collaborator

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

@quux00 quux00 force-pushed the async-search/fix-is_partial-local-search branch from 41e3327 to f236c2e Compare August 27, 2023 16:41
@quux00 quux00 requested review from piergm and javanna August 28, 2023 12:37
@quux00
Copy link
Contributor Author

quux00 commented Aug 28, 2023

When merged, be sure to inform the Kibana team, as they have a related change they need to make: elastic/kibana#164893

quux00 added 3 commits August 31, 2023 13:00
With the recent addition of per-cluster metadata to the `_clusters` section of the response
for cross-cluster searches (see elastic#97731), the `is_partial` setting in the async-search response,
now acts as a useful summary to end-users that search/aggs data from all shards is potentially incomplete
(not all shards fully searched), which could be for one of 3 reasons:

1. at least one shard was not successfully searched (a PARTIAL search cluster state)
2. at least one cluster (marked as `skip_unavailable`=`true`) was unavailable (or all
   searches on all shards of that cluster failed), causing the cluster to be marked as SKIPPED
3. a search on at least one cluster timed out (`timed_out`=`true`, resulting in a PARTIAL cluster search status)

This commit changes local-only (non-CCS) searches to behave consistently with cross-cluster searches,
namely, if any search on any shard fails or if the search times out, the is_partial flag is set to true.

Closes elastic#98725
@quux00 quux00 force-pushed the async-search/fix-is_partial-local-search branch from f236c2e to 4793600 Compare August 31, 2023 17:02
@davismcphee
Copy link

Hey team, thanks for looking into this! The elastic/kibana#164893 issue is our team's (@elastic/kibana-data-discovery), and I just wanted to ask if we could get a heads up with a couple of days notice if you decide to merge this if possible? We have an idea of how we might handle it on the Kibana side, but we've been holding off implementing anything until we're sure this is going to be merged.

Copy link
Member

@piergm piergm left a comment

Choose a reason for hiding this comment

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

LGTM!

@javanna javanna removed the :Search/Search Search-related issues that do not fall into other categories label Jul 17, 2024
@elasticsearchmachine elasticsearchmachine added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch and removed Team:Search Meta label for search team labels Jul 17, 2024
@elasticsearchmachine
Copy link
Collaborator

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

@quux00 quux00 closed this Jan 15, 2025
@javanna javanna removed the v9.0.0 label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search Foundations/Search Catch all for Search Foundations Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

async search returns is_partial:false when local cluster has shard errors
8 participants