Skip to content

Add Retry Logic for ElasticsearchInternalService#chunkedInfer #127812

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented May 7, 2025

This PR introduces basic retry functionality for the internal inference service (ElasticsearchInternalService), which runs on ML nodes. We already use an exponential backoff strategy for retrying failed inference requests to external services. This change extends the same retry mechanism to the internal service, allowing it to automatically retry transient failures. To maintain consistency and reduce complexity, this implementation reuses the existing retry configuration settings: xpack.inference.http.retry.*

Note: This PR is still a draft. Additional tests are needed, but I’d like to gather feedback on the approach before proceeding further.

This PR introduces basic retry functionality for the internal inference service (`ElasticsearchInternalService`), which runs on ML nodes.
We already use an exponential backoff strategy for retrying failed inference requests to external services.
This change extends the same retry mechanism to the internal service, allowing it to automatically retry transient failures.
To maintain consistency and reduce complexity, this implementation reuses the existing retry configuration settings:
`xpack.inference.http.retry.*`

**Note**: This PR is still a draft. Additional tests are needed, but I’d like to gather feedback on the approach before proceeding further.
@elasticsearchmachine
Copy link
Collaborator

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

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

Looks good. This is a straightforward and sensible way to add retry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants