Skip to content

Address CompoundRetrieverBuilder Failure Handling#136732

Merged
john-wagster merged 26 commits intoelastic:mainfrom
john-wagster:better_retriever_errors_on_shard_failure
Dec 13, 2025
Merged

Address CompoundRetrieverBuilder Failure Handling#136732
john-wagster merged 26 commits intoelastic:mainfrom
john-wagster:better_retriever_errors_on_shard_failure

Conversation

@john-wagster
Copy link
Contributor

exploring options for improving error handling for CompoundRetrieverBuilder particularly in the case where a response of sub retriever is 2xx but some shard failed to retrieve data.

addresses: #136529

@john-wagster
Copy link
Contributor Author

@pmpailis curious if this is roughly what you were thinking in terms of improving error handling and if you had other thoughts about how this should behave or additional checks. What else would be nice to have here? I thought about enhancing the error message handling within the if (false == failures.isEmpty()) { block to include a list of the failure messages as well. How do you feel about that?

@pmpailis
Copy link
Contributor

Thanks @john-wagster for picking this up! ❤️ Yeah, this is pretty much what I was thinking as well; only minor comments on the type of exception that we would throw (to avoid constantly 5xx).

Will take a look at adding a test case as well.

@john-wagster john-wagster requested a review from pmpailis October 17, 2025 23:03
@john-wagster john-wagster marked this pull request as ready for review October 17, 2025 23:03
@john-wagster john-wagster added :Search Relevance/Search Catch all for Search Relevance and removed WIP labels Oct 17, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Oct 17, 2025
@elasticsearchmachine
Copy link
Collaborator

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

@john-wagster john-wagster added >bug and removed Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch labels Oct 17, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Oct 17, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @john-wagster, I've created a changelog YAML for you.

@john-wagster john-wagster added v9.2.1 v9.1.6 and removed Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch labels Oct 17, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch label Oct 17, 2025
Copy link
Contributor

@pmpailis pmpailis left a comment

Choose a reason for hiding this comment

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

Really nice! thanks @john-wagster 🚀

@john-wagster john-wagster merged commit e91a91d into elastic:main Dec 13, 2025
35 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.1 Commit could not be cherrypicked due to conflicts
9.2 Commit could not be cherrypicked due to conflicts
8.19 Commit could not be cherrypicked due to conflicts

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

john-wagster added a commit to john-wagster/elasticsearch that referenced this pull request Dec 13, 2025
* passing back message and status code from each failed shard instead
john-wagster added a commit to john-wagster/elasticsearch that referenced this pull request Dec 13, 2025
* passing back message and status code from each failed shard instead
elasticsearchmachine pushed a commit that referenced this pull request Dec 13, 2025
…39483)

* Address CompoundRetrieverBuilder Failure Handling (#136732)

* passing back message and status code from each failed shard instead

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <infra-root+elasticsearchmachine@elastic.co>
elasticsearchmachine pushed a commit that referenced this pull request Dec 13, 2025
…39484)

* Address CompoundRetrieverBuilder Failure Handling (#136732)

* passing back message and status code from each failed shard instead

* spotless

* remove broken test
elasticsearchmachine pushed a commit that referenced this pull request Dec 13, 2025
…139485)

* Address CompoundRetrieverBuilder Failure Handling (#136732)

* passing back message and status code from each failed shard instead

* spotless

* removed stray method
parkertimmins pushed a commit to parkertimmins/elasticsearch that referenced this pull request Dec 17, 2025
* passing back message and status code from each failed shard instead
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged backport pending >bug :Search Relevance/Search Catch all for Search Relevance Team:Search Relevance Meta label for the Search Relevance team in Elasticsearch v8.19.10 v9.1.10 v9.2.4 v9.3.0

4 participants