-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Reindex share retry between hit sources #44203
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
Reindex share retry between hit sources #44203
Conversation
The client and remote hit sources had each their own retry mechanism, which would do the same. Supporting resiliency we would have to expand on the retry mechanisms and as a preparation for that, the retry mechanism is now shared such that each sub class is only responsible for sending requests and converting responses/failures to common format. Part of elastic#42612
Pinging @elastic/es-distributed |
@elasticmachine update-branch |
@elasticmachine update branch |
Failure looks idential to #43889 but for another test, |
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.
LGTM - I added a comment related to my preferences. But if you feel strongly otherwise, I'm fine with it.
/** | ||
* Return a new listener that delegates failure/reject to original but forwards response to responseHandler | ||
*/ | ||
default <X> RejectAwareActionListener<X> withResponseHandler(Consumer<X> responseHandler) { |
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.
My preference is for default
to be used in a scenario where you are providing default behavior for an interface that some implementation might want to overwrite. This feels more like a helper static method such as:
static <X> RejectAwareActionListener<X> withResponseHandler(RejectAwareActionListener<X> errorDelegate, Consumer<X> responseHandler) {
// Implementation
}
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 agree. Fixed in 07d4793
No intention to override witResponsseHandler method so static is more appropriate.
…rsen/elasticsearch into enhance_reindex_shared_retry
The client and remote hit sources had each their own retry mechanism, which would do the same. Supporting resiliency we would have to expand on the retry mechanisms and as a preparation for that, the retry mechanism is now shared such that each sub class is only responsible for sending requests and converting responses/failures to common format. Part of elastic#42612
The client and remote hit sources had each their own retry mechanism, which would do the same. Supporting resiliency we would have to expand on the retry mechanisms and as a preparation for that, the retry mechanism is now shared such that each sub class is only responsible for sending requests and converting responses/failures to common format. Part of #42612
The client and remote hit sources had each their own retry mechanism,
which would do the same. Supporting resiliency we would have to expand
on the retry mechanisms and as a preparation for that, the retry
mechanism is now shared such that each sub class is only responsible for
sending requests and converting responses/failures to common format.
Part of #42612