enum Consistency
Which replica a read of a clustered store is served from (§12.4, D-8220..D-8229).
Example:
use std.kv { Kv, Consistency }
fn modes(kv: Kv) -> Kv {
let _ = Consistency.Linearizable
let _ = Consistency.Stale
kv.reading(Consistency.Follower)
}pub(api) enum ConsistencyС версии. 1.0.0-beta
Варианты
Linearizable | The shard leader, after it confirmed its leadership (ReadIndex): the default. A read sees every write that completed before it. |
Follower | A replica on this node that is not the leader: it asks the leader for its read index and waits until it has applied it, then reads
its own copy. Still linearizable (the same guarantee as |
Stale | A replica on this node without asking the leader, as long as it heard from the leader within |
Определено в: std/kv/kv.oxl:260