[opt](ES catalog) Increase to 3 connect attempts per node (#30957)

This commit is contained in:
qiye
2024-02-07 20:12:43 +08:00
committed by yiguolei
parent 5bb8a72626
commit 36d753eacb

View File

@ -237,7 +237,7 @@ public class EsRestClient {
}
Request request = builder.get().url(currentNode + path).build();
if (LOG.isInfoEnabled()) {
LOG.info("es rest client request URL: {}", currentNode + "/" + path);
LOG.info("es rest client request URL: {}", request.url().toString());
}
return httpClient.newCall(request).execute();
}
@ -249,7 +249,8 @@ public class EsRestClient {
* @return response
*/
private String execute(String path) throws DorisEsException {
int retrySize = nodes.length;
// try 3 times for every node
int retrySize = nodes.length * 3;
DorisEsException scratchExceptionForThrow = null;
OkHttpClient httpClient;
if (httpSslEnable) {