mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-06 04:58:50 +00:00
a7046e001c
We have had various reports of problems caused by the maxRetryTimeout setting in the low-level REST client. Such setting was initially added in the attempts to not have requests go through retries if the request already took longer than the provided timeout. The implementation was problematic though as such timeout would also expire in the first request attempt (see #31834), would leave the request executing after expiration causing memory leaks (see #33342), and would not take into account the http client internal queuing (see #25951). Given all these issues, it seems that this custom timeout mechanism gives little benefits while causing a lot of harm. We should rather rely on connect and socket timeout exposed by the underlying http client and accept that a request can overall take longer than the configured timeout, which is the case even with a single retry anyways. This commit removes the `maxRetryTimeout` setting and all of its usages.
32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
[float]
|
|
[[breaking_70_restclient_changes]]
|
|
=== High-level REST client changes
|
|
|
|
[float]
|
|
==== API methods accepting `Header` argument have been removed
|
|
|
|
All API methods accepting headers as a `Header` varargs argument, deprecated
|
|
since 6.4, have been removed in favour of the newly introduced methods that
|
|
accept instead a `RequestOptions` argument. In case you are not specifying any
|
|
header, e.g. `client.index(indexRequest)` becomes
|
|
`client.index(indexRequest, RequestOptions.DEFAULT)`.
|
|
In case you are specifying headers
|
|
e.g. `client.index(indexRequest, new Header("name" "value"))` becomes
|
|
`client.index(indexRequest, RequestOptions.DEFAULT.toBuilder().addHeader("name", "value").build());`
|
|
|
|
[float]
|
|
==== Cluster Health API default to `cluster` level
|
|
|
|
The Cluster Health API used to default to `shards` level to ease migration
|
|
from transport client that doesn't support the `level` parameter and always
|
|
returns information including indices and shards details. The level default
|
|
value has been aligned with the Elasticsearch default level: `cluster`.
|
|
|
|
=== Low-level REST client changes
|
|
|
|
[float]
|
|
==== Support for `maxRetryTimeout` removed from RestClient
|
|
|
|
`RestClient` and `RestClientBuilder` no longer support the `maxRetryTimeout`
|
|
setting. The setting was removed as its counting mechanism was not accurate
|
|
and caused issues while adding little value. |