File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
src/main/java/sirius/db/es Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 1212import org .apache .http .HttpHost ;
1313import org .elasticsearch .client .Request ;
1414import org .elasticsearch .client .RestClient ;
15- import org .elasticsearch .client .RestClientBuilder ;
1615import sirius .db .KeyGenerator ;
1716import sirius .db .es .constraints .ElasticConstraint ;
1817import 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.
You can’t perform that action at this time.
0 commit comments