Skip to content

Commit

Permalink
[opt](ES catalog) Increase to 3 connect attempts per node (apache#30957)
Browse files Browse the repository at this point in the history
  • Loading branch information
qidaye authored Feb 7, 2024
1 parent 54bfa6f commit f336847
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ private Response executeResponse(OkHttpClient httpClient, String path) throws IO
}
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();
}
Expand All @@ -249,7 +249,8 @@ private Response executeResponse(OkHttpClient httpClient, String path) throws IO
* @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) {
Expand Down

0 comments on commit f336847

Please sign in to comment.