Skip to content

Commit 86a5413

Browse files
committed
Removes obsolete workaround
Should be fixed in elastic/elasticsearch#30384 Fixes: OX-11111
1 parent 7f46d40 commit 86a5413

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/main/java/sirius/db/es/Elastic.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
import org.apache.http.HttpHost;
1313
import org.elasticsearch.client.Request;
1414
import org.elasticsearch.client.RestClient;
15-
import org.elasticsearch.client.RestClientBuilder;
1615
import sirius.db.KeyGenerator;
1716
import sirius.db.es.constraints.ElasticConstraint;
1817
import sirius.db.es.constraints.ElasticFilterFactory;
@@ -169,19 +168,14 @@ private synchronized void initializeClient() {
169168
if (client == null) {
170169
Elastic.LOG.INFO("Initializing Elasticsearch client against: %s", hosts);
171170

172-
// Fixes an Elastic bug that results in TimeoutExceptions
173-
// Remove this, once ES is updated to at least 6.3.1
174-
RestClientBuilder.RequestConfigCallback configCallback =
175-
requestConfigBuilder -> requestConfigBuilder.setConnectionRequestTimeout(0);
176-
177171
HttpHost[] httpHosts = Arrays.stream(this.hosts.split(","))
178172
.map(String::trim)
179173
.map(host -> Strings.splitAtLast(host, ":"))
180174
.map(this::parsePort)
181175
.map(this::mapPort)
182176
.map(this::makeHttpHost)
183177
.toArray(size -> new HttpHost[size]);
184-
client = new LowLevelClient(RestClient.builder(httpHosts).setRequestConfigCallback(configCallback).build());
178+
client = new LowLevelClient(RestClient.builder(httpHosts).build());
185179

186180
// If we're using a docker container (most probably for testing), we give ES some time
187181
// to fully boot up. Otherwise, strange connection issues might arise.

0 commit comments

Comments
 (0)