Skip to content

Commit

Permalink
Optimize: Introduce multiple disk write for MPU
Browse files Browse the repository at this point in the history
  • Loading branch information
yanghua committed Sep 20, 2024
1 parent 2d81dda commit cb4cd33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tosfs/stability.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,15 @@ def retryable_func_executor(
raise e

if is_retryable_exception(e):
logger.warn("Retry TOS request in the %d times, error: %s", attempt, e)
logger.warning("Retry TOS request in the %d times, error: %s", attempt, e)
try:
time.sleep(min(1.7**attempt * 0.1, 15))
except InterruptedError as ie:
raise TosfsError(f"Request {func} interrupted.") from ie
else:
raise e
# Note: maybe not all the retryable exceptions are warped by `TosError`
# Will pay attention to those cases
except Exception as e:
raise TosfsError(f"{e}") from e

Expand Down

0 comments on commit cb4cd33

Please sign in to comment.