MCPcopy Create free account
hub / github.com/deventlab/d-engine / get_linearizable

Method get_linearizable

d-engine-server/src/api/embedded_client.rs:238–243  ·  view source on GitHub ↗

Strongly consistent read (linearizable). Guarantees reading the latest committed value by querying the Leader. Use for critical reads where staleness is unacceptable. # Performance - Latency: ~1-5ms (network RTT to Leader) - Throughput: Limited by Leader capacity # Raft Protocol Implements linearizable read per Raft §8. # Example ```ignore let client = engine.client(); let value = client.get_l

(
        &self,
        key: impl AsRef<[u8]>,
    )

Source from the content-addressed store, hash-verified

236 /// let value = client.get_linearizable(b"critical-config").await?;
237 /// ```
238 pub async fn get_linearizable(
239 &self,
240 key: impl AsRef<[u8]>,
241 ) -> ClientApiResult<Option<Bytes>> {
242 self.get_with_consistency(key, ReadConsistencyPolicy::LinearizableRead).await
243 }
244
245 /// Eventually consistent read (stale OK).
246 ///

Calls 1

get_with_consistencyMethod · 0.80