5 Durability and Consistency Functions

This chapter describes the functions used to manage durability and consistency policies. Durability policies are used with write operations to manage how likely your data writes are to persist in the event of a catastrophic failure, be it in your hardware or software layers. By default, your writes are highly durable. So managing durability policies is mostly about relaxing your durability guarantees in an effort to improve your write throughput.

Consistency policies are used with read operations to describe how likely it is that the data on your replicas will be identical to, or consistent with, the data on your master server. The most stringent consistency policy requires that the read operation be performed on the master server. In general, the stricter your consistency policy, the slower your store's read throughput.

Consistency Functions

Consistency Functions Description
kv_create_simple_consistency()

Create and initialize a Consistency structure

kv_create_time_consistency()

Create and initialize a Consistency structure using time information

kv_create_version_consistency()

Create and initialize a Consistency structure using a Version

kv_get_consistency_type()

Return the Consistency type

kv_release_consistency()

Release the Consistency structure

Durability Functions

Durability Functions Description
kv_create_durability()

Allocate and initialize a Durability structure

kv_get_default_durability()

Return the store's default Durability

kv_get_durability_master_sync()

Return the transaction synchronization policy used on the Master

kv_get_durability_replica_ack()

Return the replica's acknowledgement policy

kv_get_durability_replica_sync()

Return the transaction synchronization policy used on the replica

kv_is_default_durability()

Return whether the durability is the store's default