diff --git a/client/src/main/scala/io/delta/sharing/client/util/RetryUtils.scala b/client/src/main/scala/io/delta/sharing/client/util/RetryUtils.scala index 5f176b614..bbf6fa7cb 100644 --- a/client/src/main/scala/io/delta/sharing/client/util/RetryUtils.scala +++ b/client/src/main/scala/io/delta/sharing/client/util/RetryUtils.scala @@ -49,7 +49,7 @@ private[sharing] object RetryUtils extends Logging { ", totalDuration=" + totalDuration + " : " + e.getMessage, e ) - if (shouldRetry(e) && times <= 2 && totalDuration <= maxDurationMillis) { + if (shouldRetry(e) && times <= numRetries && totalDuration <= maxDurationMillis) { logWarning(s"Sleeping $sleepMs ms to retry on error: ${e.getMessage}.") sleeper(sleepMs) sleepMs *= 2