pub struct ReadConsistencyConfig {
pub default_policy: ReadConsistencyPolicy,
pub lease_duration_ms: u64,
pub allow_client_override: bool,
pub state_machine_sync_timeout_ms: u64,
}Expand description
Configuration for read operation consistency behavior
Fields§
§default_policy: ReadConsistencyPolicyDefault read consistency policy for the cluster
This sets the cluster-wide default behavior. Individual read requests can still override this setting when needed for specific use cases.
lease_duration_ms: u64Lease duration in milliseconds for LeaseRead policy
Only applicable when using the LeaseRead policy. The leader considers itself valid for this duration after successfully heartbeating to a quorum.
allow_client_override: boolWhether to allow clients to override the default policy per request
When true, clients can specify consistency requirements per read request. When false, all reads use the cluster’s default_policy setting.
state_machine_sync_timeout_ms: u64Timeout in milliseconds to wait for state machine to catch up with commit index
Used by LinearizableRead to ensure the state machine has applied all committed entries before serving reads. Typical apply latency is <1ms on local SSD. Default: 10ms (safe buffer for single-node local deployments)
Trait Implementations§
Source§impl Clone for ReadConsistencyConfig
impl Clone for ReadConsistencyConfig
Source§fn clone(&self) -> ReadConsistencyConfig
fn clone(&self) -> ReadConsistencyConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReadConsistencyConfig
impl Debug for ReadConsistencyConfig
Source§impl Default for ReadConsistencyConfig
impl Default for ReadConsistencyConfig
Source§impl<'de> Deserialize<'de> for ReadConsistencyConfig
impl<'de> Deserialize<'de> for ReadConsistencyConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ReadConsistencyConfig
impl RefUnwindSafe for ReadConsistencyConfig
impl Send for ReadConsistencyConfig
impl Sync for ReadConsistencyConfig
impl Unpin for ReadConsistencyConfig
impl UnwindSafe for ReadConsistencyConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request