singhpk234 commented on code in PR #13449:
URL: https://github.com/apache/iceberg/pull/13449#discussion_r2180987455


##########
core/src/main/java/org/apache/iceberg/rest/ExponentialHttpRequestRetryStrategy.java:
##########
@@ -117,7 +140,15 @@ public boolean retryRequest(
 
   @Override
   public boolean retryRequest(HttpResponse response, int execCount, 
HttpContext context) {
-    return execCount <= maxRetries && 
retriableCodes.contains(response.getCode());
+    HttpRequest request =
+        context instanceof HttpCoreContext ? ((HttpCoreContext) 
context).getRequest() : null;

Review Comment:
   I think by default the context object is null, we reverted setting the 
context :) 
   
   as we call this API  from HTTPClient#execute
   
   ```
       @Override
       public CloseableHttpResponse execute(
               final ClassicHttpRequest request) throws IOException {
           return doExecute(determineTarget(request), request, null);
       }
   
   ```
   
   we need to add this before the execute and pass :) !
   HttpContext context = HttpClientContext.create();
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to