From 70be80b485dd900effc5fcb432d1e37854774680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Fri, 26 Apr 2019 10:26:15 +0200 Subject: [PATCH] HSEARCH-3541 Do not rely on the Elasticsearch client's "max retry timeout" anymore It is no longer available in Elasticsearch 7, and we already have our own timeout. It just won't retry anymore. See https://github.com/elastic/elasticsearch/issues/25951#issuecomment-460929775 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. --- .../client/impl/ElasticsearchClientFactoryImpl.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/client/impl/ElasticsearchClientFactoryImpl.java b/backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/client/impl/ElasticsearchClientFactoryImpl.java index 8ccb3d51f63..51a78b13986 100644 --- a/backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/client/impl/ElasticsearchClientFactoryImpl.java +++ b/backend/elasticsearch/src/main/java/org/hibernate/search/backend/elasticsearch/client/impl/ElasticsearchClientFactoryImpl.java @@ -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 )