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
-
objectYdbRetryPolicy
- 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
maxAttemptsintfastBackoffBaseMsintslowBackoffBaseMsintfastCapBackoffMsintslowCapBackoffMsintenableRetryIdempotencebool
Methods
GetNextDelay(Exception)
Calculates the next retry delay based on the last exception and retry attempt count.
protected override TimeSpan? GetNextDelay(Exception lastException)
Parameters
lastExceptionException
Returns
ShouldRetryOn(Exception)
Determines if the given exception is retryable according to YDB rules.
protected override bool ShouldRetryOn(Exception exception)
Parameters
exceptionException