-
Notifications
You must be signed in to change notification settings - Fork 21
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
Added a retry logic and a service availability check function for high availability. #136
Conversation
5b2333f
to
0284e04
Compare
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 left some of the my concerns. No worries, the direction of the patch should be reasonable but we need to handle for error cases and retrying period precisely.
Thank you for your comments |
…on and search operations in case of connection failures. Signed-off-by: Oleh Palanskyi <trahterber@gmail.com> Signed-off-by: Oleh <Trahterber@gmail.com> Signed-off-by: OlehPalanskyi <Trahterber@gmail.com>
I created a service availability check function for high availability. New function get_reachable_hosts in in_opensearch.rb I used one library opensearch to solve this problem. Signed-off-by: OlehPalanskyi <Trahterber@gmail.com>
Signed-off-by: OlehPalanskyi <Trahterber@gmail.com>
Signed-off-by: OlehPalanskyi <Trahterber@gmail.com>
Signed-off-by: Oleh <trahterber@gmail.com> Signed-off-by: OlehPalanskyi <Trahterber@gmail.com>
Signed-off-by: Oleh <trahterber@gmail.com> Signed-off-by: OlehPalanskyi <Trahterber@gmail.com>
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.
Thanks for your work. It's brilliant work! All of the implementation should be exceeded my expectations.
@kenhys Any concerns? |
On thing, I had a nitpick though. The retry_state often should be used inside of |
Description
Problem:
If there are two servers in the hosts field (example: hosts "server1:9200,server2:9200"), automatic switching to the available host does not work. If server1 is unavailable, it does not switch to server2, and the service writes an error and freezes:
"Unexpected error raised. Stopping the timer. title=:in_opensearch_timer error_class=Faraday::ConnectionFailed error="EOFError (EOFError)""
Solution:
I added a retry logic in case of connection failures.
I created a service availability check function for high availability. New function get_reachable_hosts in in_opensearch.rb
I used one library opensearch to solve this problem.
And added ignoring any clear_scroll errors.
Checklist