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

Retry on dynamic index creation when an OpenSearchException is thrown #3541

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

engechas
Copy link
Collaborator

Description

Adds infinite retry when an OpenSearchException is thrown during dynamic index creation. This aligns with the behavior of static index creation.

Issues Resolved

#3393

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

dlvenable
dlvenable previously approved these changes Oct 24, 2023
Copy link
Member

@graytaylor0 graytaylor0 left a comment

Choose a reason for hiding this comment

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

What if it’s not a retryable error? For example, what if the dynamic index name contained capitalization. Would we infinitely retry?

graytaylor0
graytaylor0 previously approved these changes Oct 25, 2023
@engechas
Copy link
Collaborator Author

What if it’s not a retryable error? For example, what if the dynamic index name contained capitalization. Would we infinitely retry?

Is that exposed as an OpenSearch exception? If so then yes it would spin and retry. I am not sure there is a simple way to get more granular. We could try to match the text of the exception maybe but I think we'd end up with more crashes for truly retryable issues. Open to ideas.

My thought is that any exception from opensearch is an external dependency failure that requires rectification from the user. I think we should avoid crashes from external dependency failures in general and instead try to provide wording on how it can be fixed inline so the customer can take action.

Let me know if you feel otherwise and I can work on granularity here

@engechas engechas dismissed stale reviews from graytaylor0 and dlvenable via 0e1708d November 10, 2023 19:29
Signed-off-by: Chase Engelbrecht <[email protected]>
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.

3 participants