From 8cc58f75a2c5ff6a27bbab19508f419b5bf9f103 Mon Sep 17 00:00:00 2001 From: Mikhail Montsev Date: Sun, 29 Sep 2024 19:22:11 +0100 Subject: [PATCH] blockstore SDK should not retry E_TRY_AGAIN (#2154) --- cloud/blockstore/public/sdk/go/client/error.go | 3 ++- cloud/blockstore/public/sdk/python/client/error.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cloud/blockstore/public/sdk/go/client/error.go b/cloud/blockstore/public/sdk/go/client/error.go index e3667181429..6a44531a347 100644 --- a/cloud/blockstore/public/sdk/go/client/error.go +++ b/cloud/blockstore/public/sdk/go/client/error.go @@ -38,8 +38,9 @@ func (e *ClientError) Error() string { func (e *ClientError) IsRetriable() bool { switch e.Code { - case E_REJECTED, E_TIMEOUT, E_THROTTLED, E_TRY_AGAIN, E_OUT_OF_SPACE: + case E_REJECTED, E_TIMEOUT, E_THROTTLED, E_OUT_OF_SPACE: // special error code for retries + // NOTE: do not add E_TRY_AGAIN here - it is not retriable for a reason return true } diff --git a/cloud/blockstore/public/sdk/python/client/error.py b/cloud/blockstore/public/sdk/python/client/error.py index 0a3629298ab..b4438cf85e4 100644 --- a/cloud/blockstore/public/sdk/python/client/error.py +++ b/cloud/blockstore/public/sdk/python/client/error.py @@ -54,11 +54,11 @@ def from_grpc_error(rpc_error: grpc.RpcError): @property def is_retriable(self) -> bool: # special error code for retries + # NOTE: do not add E_TRY_AGAIN here - it is not retriable for a reason if self.code in [ EResult.E_REJECTED.value, EResult.E_TIMEOUT.value, EResult.E_THROTTLED.value, - EResult.E_TRY_AGAIN.value, EResult.E_OUT_OF_SPACE.value, ]: return True