nastra commented on code in PR #6489:
URL: https://github.com/apache/iceberg/pull/6489#discussion_r1065854340


##########
core/src/main/java/org/apache/iceberg/rest/auth/OAuth2Util.java:
##########
@@ -344,7 +382,20 @@ public Pair<Integer, TimeUnit> refresh(RESTClient client) {
             Tasks.foreach(ref)
                 .suppressFailureWhenFinished()
                 .retry(5)
-                .onFailure((task, err) -> LOG.warn("Failed to refresh token", 
err))
+                .onFailure(
+                    (holder, err) -> {
+                      if (null != credential) {

Review Comment:
   I have a test for this behavior but it needs some additional changes to the 
code (parameterizing the number of retries that are being done so that the 
default of 5 can be lowered to 1 for testing). @rdblue are we ok adding that 
test + the code changes for parameterizing the number of retries as a separate 
PR?
   I've pushed this change to a separate branch for now 
(https://github.com/nastra/iceberg/commit/5ff86cf620b0742208384e9849427628f4eff275)



-- 
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