Skip to content

Commit fc9da22

Browse files
authored
Updated retry timeout (#497)
* Updated the retry_logic * Added logging for checking retry time
1 parent 4c62c69 commit fc9da22

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/databricks/sql/auth/retry.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,9 @@ def sleep_for_retry(self, response: BaseHTTPResponse) -> bool:
290290
else:
291291
proposed_wait = self.get_backoff_time()
292292

293-
proposed_wait = min(proposed_wait, self.delay_max)
293+
proposed_wait = max(proposed_wait, self.delay_max)
294294
self.check_proposed_wait(proposed_wait)
295+
logger.debug(f"Retrying after {proposed_wait} seconds")
295296
time.sleep(proposed_wait)
296297
return True
297298

src/databricks/sql/thrift_backend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
# - 900s attempts-duration lines up w ODBC/JDBC drivers (for cluster startup > 10 mins)
6767
_retry_policy = { # (type, default, min, max)
6868
"_retry_delay_min": (float, 1, 0.1, 60),
69-
"_retry_delay_max": (float, 30, 5, 3600),
69+
"_retry_delay_max": (float, 60, 5, 3600),
7070
"_retry_stop_after_attempts_count": (int, 30, 1, 60),
7171
"_retry_stop_after_attempts_duration": (float, 900, 1, 86400),
7272
"_retry_delay_default": (float, 5, 1, 60),

0 commit comments

Comments
 (0)