Table of Contents

Class YdbRetryPolicy

Namespace
LinqToDB.Internal.DataProvider.Ydb
Assembly
linq2db.dll

YDB-specific retry policy implementation. Implements official YDB retry strategies such as Full Jitter and Equal Jitter, with different backoff timings depending on status codes. Based on the retry logic from the YDB SDK (YdbRetryPolicy + YdbRetryPolicyConfig).

public sealed class YdbRetryPolicy : RetryPolicyBase, IRetryPolicy
Inheritance
object
YdbRetryPolicy
Implements
Inherited Members
Extension Methods

Constructors

YdbRetryPolicy()

Default constructor — fully matches the default settings from YDB SDK.

public YdbRetryPolicy()

YdbRetryPolicy(int, int, int, int, int, bool)

Extended constructor (can be used together with RetryPolicyOptions if desired). Base class parameters are not critical since we completely override the delay calculation logic.

public YdbRetryPolicy(int maxAttempts, int fastBackoffBaseMs, int slowBackoffBaseMs, int fastCapBackoffMs, int slowCapBackoffMs, bool enableRetryIdempotence)

Parameters

maxAttempts int
fastBackoffBaseMs int
slowBackoffBaseMs int
fastCapBackoffMs int
slowCapBackoffMs int
enableRetryIdempotence bool

Methods

GetNextDelay(Exception)

Calculates the next retry delay based on the last exception and retry attempt count.

protected override TimeSpan? GetNextDelay(Exception lastException)

Parameters

lastException Exception

Returns

TimeSpan?

ShouldRetryOn(Exception)

Determines if the given exception is retryable according to YDB rules.

protected override bool ShouldRetryOn(Exception exception)

Parameters

exception Exception

Returns

bool