Skip to main content

Module pending

Module pending 

Source
Expand description

Durable FIFO queue of outbound array ops waiting for transport to Origin.

Backed by Namespace::ArrayDelta. Each entry’s key is the 18-byte big-endian HLC encoding from Hlc::to_bytes, giving natural FIFO order because HLCs are strictly monotonic per replica and to_bytes is byte-comparable.

Each value holds the encoded op and its stream seq. The seq is 0 until the push loop first sends the op. The push loop persists the seq before that send, so a re-send after a reconnect carries the same seq.

An op leaves the queue when Origin confirms it (PendingQueue::retire) or refuses it permanently (PendingQueue::remove).

§Backpressure

When PendingQueue::len reaches PendingQueue::DEFAULT_CAP (or the cap supplied to PendingQueue::with_cap), PendingQueue::enqueue returns LiteError::Backpressure instead of writing to storage.

Structs§

PendingArrayOp
One queued op, in the shape the push loop sends it.
PendingQueue
Durable outbound pending-op queue backed by Namespace::ArrayDelta.