Expand description
Recording the log entries a processor ingests.
LogTracker is the hook the processor calls for every ingested entry,
enqueued into the same batch that applies the entry. Implementations decide
what to record. LogIndexTracker is the built-in one — an op-log table
keyed by (peer_id, entry_idx) that future readers can dedup, revision
history, and attribution from without replaying the reducer.
Readers derive from the table without replaying the reducer —
all_cursors for the version vector,
HistoryTracker::read_entries to reconstruct entries. The expunged-marker
rows track_expunged writes (tag =
TAG_EXPUNGED, no attribution, no timestamp) occupy a stream index but are
not real entries, so a reader must not count or attribute them.
Structs§
- LogIndex
Tracker - The default
LogTracker: writes each entry into a single<prefix>__oplogtable keyed by(peer_id, entry_idx), storing the HLC timestamp and the op’s decoded index key/value.
Enums§
- LogTracker
Error - Failure from
LogTracker::track_one. Splitting the op into its index triple is aCodecError; binding a value that won’t fit the backend’s signed-integer column (au64pasti64::MAX, viaDbValue::from_u64) is aDbError. Both are surfaced so the tracker can use the same checked conversion the rest of the crate relies on instead of a lossyascast.
Traits§
- History
Tracker - A
LogTrackerthat also reconstructs stored entries — the op-log case, which keeps full history and so can back a replicationLogSource. - LogTracker
- Records each log entry as the processor ingests it.