Click or drag to resize

DowngradingConsistencyRetryPolicyOnWriteTimeout Method

Defines whether to retry and at which consistency level on a write timeout.

This method triggers a maximum of one retry. If writeType == WriteType.BATCH_LOG, the write is retried with the initial consistency level. If writeType == WriteType.UNLOGGED_BATCH and at least one replica acknowleged, the write is retried with a lower consistency level (with unlogged batch, a write timeout can always mean that part of the batch haven't been persisted at' all, even if receivedAcks > 0). For other writeType, if we know the write has been persisted on at least one replica, we ignore the exception. Otherwise, an exception is thrown.

Namespace:  Dse
Assembly:  Dse (in Dse.dll) Version: 2.9.0
Syntax
C#
public RetryDecision OnWriteTimeout(
	IStatement query,
	ConsistencyLevel cl,
	string writeType,
	int requiredAcks,
	int receivedAcks,
	int nbRetry
)

Parameters

query
Type: DseIStatement
the original query that timeouted.
cl
Type: DseConsistencyLevel
the original consistency level of the write that timeouted.
writeType
Type: SystemString
the type of the write that timeouted.
requiredAcks
Type: SystemInt32
the number of acknowledgments that were required to achieve the requested consistency level.
receivedAcks
Type: SystemInt32
the number of acknowledgments that had been received by the time the timeout exception was raised.
nbRetry
Type: SystemInt32
the number of retry already performed for this operation.

Return Value

Type: RetryDecision
a RetryDecision as defined above.

Implements

IRetryPolicyOnWriteTimeout(IStatement, ConsistencyLevel, String, Int32, Int32, Int32)
See Also