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

Function should_send

nodedb/src/control/array_sync/outbound/cursor.rs:19–21  ·  view source on GitHub ↗

Return `true` if `op_hlc` has not yet been delivered to the subscriber. An op is eligible when `op_hlc > last_pushed_hlc`, i.e. it arrived after the subscriber's watermark. The HLC's total ordering (physical_ms, logical, replica_id) guarantees this is correct under any clock skew.

(op_hlc: Hlc, last_pushed_hlc: Hlc)

Source from the content-addressed store, hash-verified

17/// The HLC's total ordering (physical_ms, logical, replica_id) guarantees
18/// this is correct under any clock skew.
19pub fn should_send(op_hlc: Hlc, last_pushed_hlc: Hlc) -> bool {
20 op_hlc > last_pushed_hlc
21}
22
23/// Advance the subscriber cursor to `op_hlc` and persist.
24///

Callers 1

deliver_to_sessionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected