MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / record

Method record

nodedb-array/src/sync/ack.rs:39–44  ·  view source on GitHub ↗

Record that `replica` has applied all ops up to and including `hlc`. Monotonic: if the existing watermark for `replica` is already higher, the call is a silent no-op.

(&mut self, replica: ReplicaId, hlc: Hlc)

Source from the content-addressed store, hash-verified

37 /// Monotonic: if the existing watermark for `replica` is already higher,
38 /// the call is a silent no-op.
39 pub fn record(&mut self, replica: ReplicaId, hlc: Hlc) {
40 let entry = self.acks.entry(replica).or_insert(Hlc::ZERO);
41 if hlc > *entry {
42 *entry = hlc;
43 }
44 }
45
46 /// Return the ack watermark for a specific replica, if known.
47 pub fn ack_for(&self, replica: ReplicaId) -> Option<Hlc> {

Callers 8

record_is_monotonicFunction · 0.45
min_returns_lowestFunction · 0.45
single_peerFunction · 0.45
serialize_roundtripFunction · 0.45

Calls 1

entryMethod · 0.80

Tested by 8

record_is_monotonicFunction · 0.36
min_returns_lowestFunction · 0.36
single_peerFunction · 0.36
serialize_roundtripFunction · 0.36