Updated Connections handling (#1127)

* Updated Connections handling

- The ConnectionPool.getConnection method now always returns a connection
- The ConnectionPool.update mehtod now cleans the dead list
- Deprecated the NoLivingConnectionsError

* Updated test

* Updated docs

* The NoLivingConnectionsError can still happen if the filter/selector returns no nodes

* Updated test

* Updated docs

* Catch undefined connections as well

* Updated test

* Updated ApiError type def
This commit is contained in:
Tomas Della Vedova
2020-03-26 13:41:05 +01:00
committed by GitHub
parent 85616b07ef
commit f913f7d2d2
7 changed files with 62 additions and 49 deletions

View File

@ -204,7 +204,7 @@ You can find the errors exported by the client in the table below.
[cols=2*]
|===
|`ElasticsearchClientErrors`
|`ElasticsearchClientError`
|Every error inherits from this class, it is the basic error generated by the client.
|`TimeoutError`
@ -214,7 +214,7 @@ You can find the errors exported by the client in the table below.
|Generated when an error occurs during the request, it can be a connection error or a malformed stream of data.
|`NoLivingConnectionsError`
|Generated in case of all connections present in the connection pool are dead.
|Given the configuration, the ConnectionPool was not able to find a usable Connection for this request.
|`SerializationError`
|Generated if the serialization fails.