This is an automated email from the ASF dual-hosted git repository. madhan pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push: new f3bfe26b5 ATLAS-4994: The Atlas client should retry on HTTP 500 errors (#299) f3bfe26b5 is described below commit f3bfe26b56adfacfc8aa5ea76db2751b37cbe717 Author: harmadasg <54865262+harmad...@users.noreply.github.com> AuthorDate: Thu Feb 27 17:16:31 2025 +0100 ATLAS-4994: The Atlas client should retry on HTTP 500 errors (#299) --- client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java b/client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java index b824f218d..6e4cb7171 100644 --- a/client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java +++ b/client/common/src/main/java/org/apache/atlas/AtlasBaseClient.java @@ -497,10 +497,11 @@ public abstract class AtlasBaseClient { } catch (ClientHandlerException e) { throw new AtlasServiceException(api, e); } - } else if (clientResponse.getStatus() != ClientResponse.Status.SERVICE_UNAVAILABLE.getStatusCode()) { + } else if (clientResponse.getStatus() != ClientResponse.Status.SERVICE_UNAVAILABLE.getStatusCode() && + clientResponse.getStatus() != ClientResponse.Status.INTERNAL_SERVER_ERROR.getStatusCode()) { break; } else { - LOG.error("Got a service unavailable when calling: {}, will retry..", resource); + LOG.error("attempt #{}: error {} when calling: {}, will retry..", (i + 1), clientResponse.getStatus(), resource); sleepBetweenRetries(); }