Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement consistent retry policy when calling Elasticsearch #2063
Implement consistent retry policy when calling Elasticsearch #2063
Changes from 19 commits
1915aee
4679b8b
88d2362
aa60d9d
2a23340
af94a15
7b7482b
989ffdc
edc9518
65bcf56
658ba84
fbfdd40
6f67dbe
d009e43
9910c4c
4d3d441
50ba7e3
f9fbe16
edc1e2a
3a111f1
45a3b5e
a4d4f8b
8e431d5
c405831
4be0bd8
d0b1fdd
fe133e8
e4cbd88
4c12c18
244ce2e
faf1479
2d64473
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to use constants like
DEFAULT_MAX_RETRIES
instead of the raw number. It's just easier to find and change them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added constants in a4d4f8b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why
ping
is not retried?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not retried cause of
wait
method -wait
callsping
and does retrying based on its own config options. See method:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in slack, I think we should combine
wait
andping
, but it's totally fine to address it in a separate PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please expand more on this comment? I don't fully understand how can we handle individual items errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So now we have 500 items that we send, then if 1 fails we retry the whole batch.
What I wanna do in later PRs:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is a good way to handle it but we can discuss it later.
Thanks for the details 👍🏻