Click or drag to resize

DefaultRetryPolicyOnWriteTimeout Method

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

This method triggers a maximum of one retry, and only in the case of a WriteType.BATCH_LOG write. The reasoning for the retry in that case is that write to the distributed batch log is tried by the coordinator of the write against a small subset of all the node alive in the local datacenter. Hence, a timeout usually means that none of the nodes in that subset were alive but the coordinator hasn't' detected them as dead. By the time we get the timeout the dead nodes will likely have been detected as dead and the retry has thus a high change of success.

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
RetryDecision.retry(cl) if no retry attempt has yet been tried and writeType == WriteType.BATCH_LOG, RetryDecision.rethrow() otherwise.

Implements

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