BEWARE: This policy may retry queries using a lower consistency level than the one initially requested. By doing so, it may break consistency guarantees. In other words, if you use this retry policy, there is cases (documented below) where a read at
This policy : the same retries than the DefaultRetryPolicy policy. But on top of that, it also retries in the following cases:
- On a read timeout: if the number of replica that responded is greater than one but lower than is required by the requested consistency level, the operation is retried at a lower concistency level.
- On a write timeout: if the operation is an
- On an unavailable exception: if at least one replica is alive, the operation is retried at a lower consistency level.
The reasoning behing this retry policy is the following one. If, based on the information the Cassandra coordinator node returns, retrying the operation with the initally requested consistency has a change to succeed, do it. Otherwise, if based on these informations we know the initially requested consistency level cannot be achieve currently, then:
- For writes, ignore the exception (thus silently failing the consistency requirement) if we know the write has been persisted on at least one replica.
- For reads, try reading at a lower consistency level (thus silently failing the consistency requirement).
Assembly: Cassandra (in Cassandra.dll) Version: 22.214.171.124 (126.96.36.199)