Skip to content

Commit

Permalink
HSEARCH-3541 Do not rely on the Elasticsearch client's "max retry tim…
Browse files Browse the repository at this point in the history
…eout" anymore

It is no longer available in Elasticsearch 7, and we already have our
own timeout. It just won't retry anymore.
See elastic/elasticsearch#25951 (comment)

Note this clears the path for more useful timeouts that start when the
request is sent to the cluster rather than when the request is queued.
See https://hibernate.atlassian.net/browse/HSEARCH-2836.
  • Loading branch information
yrodiere authored and gsmet committed Apr 26, 2019
1 parent 88646fe commit c39205a
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,6 @@ private RestClient createClient(ConfigurationPropertySource propertySource,
ServerUris hosts = ServerUris.fromStrings( HOST.get( propertySource ) );

return RestClient.builder( hosts.asHostsArray() )
/*
* Note: this timeout is currently only used on retries,
* but should we start using the synchronous methods of RestClient,
* it would be applied to synchronous requests too.
* See https://github.com/elastic/elasticsearch/issues/21789#issuecomment-287399115
*/
.setMaxRetryTimeoutMillis( maxRetryTimeoutMillis )
.setRequestConfigCallback( b -> customizeRequestConfig( b, propertySource ) )
.setHttpClientConfigCallback(
b -> customizeHttpClientConfig( b, httpClientConfigurers, propertySource, hosts )
Expand Down

0 comments on commit c39205a

Please sign in to comment.