Class ClickHouseRetryPolicy
- Namespace
 - LinqToDB.DataProvider.ClickHouse
 
- Assembly
 - linq2db.dll
 
Retry policy handles only following exceptions:
- Octonica client ClickHouseException with codes ClickHouseErrorCodes.InvalidConnectionState, ClickHouseErrorCodes.ConnectionClosed, ClickHouseErrorCodes.NetworkError
 - MySqlConnector 
MySqlException.IsTransient == true(requires .NET 6+ and MySqlConnector 1.3.0 or greater) 
public class ClickHouseRetryPolicy : RetryPolicyBase, IRetryPolicy
  - Inheritance
 - 
      
      
      ClickHouseRetryPolicy
 
- Implements
 
- Inherited Members
 
- Extension Methods
 
Constructors
ClickHouseRetryPolicy()
Creates a new instance of ClickHouseRetryPolicy.
public ClickHouseRetryPolicy()
  ClickHouseRetryPolicy(int)
Creates a new instance of ClickHouseRetryPolicy.
public ClickHouseRetryPolicy(int maxRetryCount)
  Parameters
maxRetryCountintThe maximum number of retry attempts.
ClickHouseRetryPolicy(int, TimeSpan, double, double, TimeSpan, ICollection<int>?)
Creates a new instance of ClickHouseRetryPolicy.
public ClickHouseRetryPolicy(int maxRetryCount, TimeSpan maxRetryDelay, double randomFactor, double exponentialBase, TimeSpan coefficient, ICollection<int>? errorNumbersToAdd)
  Parameters
maxRetryCountintThe maximum number of retry attempts.
maxRetryDelayTimeSpanThe maximum delay in milliseconds between retries.
randomFactordoubleThe maximum random factor.
exponentialBasedoubleThe base for the exponential function used to compute the delay between retries.
coefficientTimeSpanThe coefficient for the exponential function used to compute the delay between retries.
errorNumbersToAddICollection<int>Additional SQL error numbers that should be considered transient.
Methods
GetNextDelay(Exception)
protected override TimeSpan? GetNextDelay(Exception lastException)
  Parameters
lastExceptionException
Returns
ShouldRetryOn(Exception)
protected override bool ShouldRetryOn(Exception exception)
  Parameters
exceptionException