From 715b14106223e9eb0396fb78335832513a40270d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3?= <150132506+iddqdex@users.noreply.github.com> Date: Mon, 27 May 2024 18:16:31 +0000 Subject: [PATCH] Moved "Abiltit to retry undefined status" commit from ydb repo --- include/ydb-cpp-sdk/client/retry/retry.h | 1 + src/client/impl/ydb_internal/retry/retry.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/ydb-cpp-sdk/client/retry/retry.h b/include/ydb-cpp-sdk/client/retry/retry.h index 9ce9c83785..b41f4c7f32 100644 --- a/include/ydb-cpp-sdk/client/retry/retry.h +++ b/include/ydb-cpp-sdk/client/retry/retry.h @@ -24,6 +24,7 @@ struct TRetryOperationSettings { FLUENT_SETTING_DEFAULT(TBackoffSettings, SlowBackoffSettings, DefaultSlowBackoffSettings()); FLUENT_SETTING_FLAG(Idempotent); FLUENT_SETTING_FLAG(Verbose); + FLUENT_SETTING_FLAG(RetryUndefined); static TBackoffSettings DefaultFastBackoffSettings() { return TBackoffSettings() diff --git a/src/client/impl/ydb_internal/retry/retry.h b/src/client/impl/ydb_internal/retry/retry.h index 5f501de916..1c97cf9d22 100644 --- a/src/client/impl/ydb_internal/retry/retry.h +++ b/src/client/impl/ydb_internal/retry/retry.h @@ -103,7 +103,7 @@ class TRetryContextBase : TNonCopyable { } default: - return NextStep::Finish; + return Settings_.RetryUndefined_ ? NextStep::RetrySlowBackoff : NextStep::Finish; } }