From cb4cd3379ef9ae60daf9f7c8a2b8c8d68a42ded6 Mon Sep 17 00:00:00 2001 From: yanghua Date: Fri, 20 Sep 2024 15:25:15 +0800 Subject: [PATCH] Optimize: Introduce multiple disk write for MPU --- tosfs/stability.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tosfs/stability.py b/tosfs/stability.py index 6a0e027..c044bb1 100644 --- a/tosfs/stability.py +++ b/tosfs/stability.py @@ -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