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

Allowing failed splits in root search. #5440

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

fulmicoton
Copy link
Contributor

@fulmicoton fulmicoton commented Sep 20, 2024

    Allowing failed splits in root search.

    This PR adds a query string parameter (`allow_partial_search_results`) in
    the elasticsearch api controlling encounterring an error on a subset
    of the splits, should fail a search query or if a response
    (reflecting the partial set of successful splits) should be returned.

    It changes the behavior of the root search gRPC call, that will not return
    an error in presence of partial split errors, but instead returns the list of splits that failed.

    This PR also changes the default behavior of the elasticsearch rest API: following elasticsearch behavior on failing shards, quickwit will allow split errors.

    The Quickwit API default behavior, on the other hand, is unchanged.

    Closes #5411

(I also tested the option by removing splits on a running quickwit instance)

@fulmicoton fulmicoton force-pushed the issue/5411-lenient-on-split-failure branch 2 times, most recently from f518830 to 0dfec8f Compare September 20, 2024 10:01
Copy link

github-actions bot commented Sep 20, 2024

On SSD:

Average search latency is 0.999x that of the reference (lower is better).
Ref run id: 3482, ref commit: 7d357fa
Link

On GCS:

Average search latency is 1.01x that of the reference (lower is better).
Ref run id: 3483, ref commit: 7d357fa
Link

@fulmicoton fulmicoton force-pushed the issue/5411-lenient-on-split-failure branch 6 times, most recently from 47abca3 to a2401d8 Compare September 25, 2024 08:49
@fulmicoton fulmicoton marked this pull request as ready for review September 25, 2024 08:50
This PR adds a query string parameter (`allow_partial_search_results`) in
the elasticsearch api controlling encounterring an error on a subset
of the splits, should fail a search query or if a response
(reflecting the partial set of successful splits) should be returned.

It changes the behavior of the root search gRPC call, that will not return
an error in presence of partial split errors, but instead returns the list of splits that failed.

This PR also changes the default behavior of the elasticsearch rest API: following elasticsearch behavior on failing shards, quickwit will allow split errors.

The Quickwit API default behavior, on the other hand, is unchanged.

Closes #5411
@fulmicoton fulmicoton force-pushed the issue/5411-lenient-on-split-failure branch from a2401d8 to 8754e83 Compare September 25, 2024 09:31
@fulmicoton fulmicoton force-pushed the issue/5411-lenient-on-split-failure branch 2 times, most recently from e178af0 to 6a6ee22 Compare September 26, 2024 02:50
@fulmicoton fulmicoton force-pushed the issue/5411-lenient-on-split-failure branch from 6a6ee22 to ea024cd Compare September 26, 2024 02:54
Comment on lines 861 to 864
// Ideally, we would have wanted to reuse the setting from the initial search request.
// However, passing that parameter is cumbersome and not necessary:
// if we have a valid `scroll_id` it means that the search request was successful.
// We can therefore allow failed splits, it won't make any difference.
Copy link
Contributor

Choose a reason for hiding this comment

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

i agree it's cumbersome, and i'm fine with it being left as TODO.
I'm not convinced by the argument that if we have a scroll id, search was successful. After a few pages, we need to do more search, which might hit a missing split (or fail for whatever reason), so an initial success only guarantees we're okay for so much calls.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

:( yes you are correct.

@fulmicoton fulmicoton force-pushed the issue/5411-lenient-on-split-failure branch from 0e87fe3 to d922852 Compare September 27, 2024 03:11
The logic is now aligned with what is done for queries:
we check the schema at the root level.

If the aggregation does not make sense for the current
index docmapping, the query is rejected.
@fulmicoton fulmicoton force-pushed the issue/5411-lenient-on-split-failure branch from d922852 to 8a166b7 Compare September 27, 2024 05:06
@fulmicoton fulmicoton merged commit 26d983d into main Sep 27, 2024
5 checks passed
@fulmicoton fulmicoton deleted the issue/5411-lenient-on-split-failure branch September 27, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants