olivere / elastic

Deprecated: Use the official Elasticsearch client for Go at https://github.com/elastic/go-elasticsearch
https://olivere.github.io/elastic/
MIT License
7.39k stars 1.15k forks source link

fix: attempt to retry and mark connection as dead #1668

Closed mwain closed 1 year ago

mwain commented 1 year ago

When nodes are being shutdown quickly we have a window when a connection is alive in the pool, but erroring when a request is performed.

It does retry, however there is an edge case on the next pass a connection could be chosen which should be dead.

This change alters the retry logic, when an error is returned from the retrier and continue == true, it will mark the connection as dead and retry.

olivere commented 1 year ago

I appreciate your time and effort to push this PR. However, this library is deprecated for over a year now, and won't be worked on. Please move to the official Elasticsearch client for Go. Thanks for your understanding.