Skip to content

Commit

Permalink
blockstore SDK should not retry E_TRY_AGAIN (#2154)
Browse files Browse the repository at this point in the history
  • Loading branch information
SvartMetal committed Sep 29, 2024
1 parent 78fb98b commit 8cc58f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cloud/blockstore/public/sdk/go/client/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion cloud/blockstore/public/sdk/python/client/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8cc58f7

Please sign in to comment.