Function cassandra_cpp_sys::cass_retry_policy_downgrading_consistency_new [] [src]

pub unsafe extern "C" fn cass_retry_policy_downgrading_consistency_new(
) -> *mut CassRetryPolicy

Creates a new downgrading consistency retry policy.

Important: This policy may attempt to retry requests with a lower consistency level. Using this policy can break consistency guarantees.

This policy will retry in the same scenarios as the default policy, but it will also retry in the following cases:

  • On a read timeout, if some replicas responded but is lower than required by the current consistency level then retry with a lower consistency level.
  • On a write timeout, Retry unlogged batches at a lower consistency level if at least one replica responded. For single queries and batch if any replicas responded then consider the request successful and swallow the error.
  • On unavailable, retry at a lower consistency if at lease one replica responded.

This goal of this policy is to attempt to save a request if there's any chance of success. A writes succeeds as long as there's a single copy persisted and a read will succeed if there's some data available even if it increases the risk of reading stale data.

@public @memberof CassRetryPolicy

@return Returns a retry policy that must be freed.

@see cass_retry_policy_free()