Expand description
Commit Marker Stream Format (§3.5.4 + §3.5.4.1, bd-1hi.23).
The marker stream under ecs/markers/ is the total order of commits in
Native mode. It is the authoritative, tamper-evident, seekable commit log.
On-disk encoding: all fixed-width integers are little-endian (§3.5.1).
Sizes are byte-exact — never derived from mem::size_of::<T>().
Structs§
- Commit
Marker Record - On-disk commit marker record.
- Marker
Segment Header - On-disk segment header for the commit marker stream.
Enums§
- Marker
Error - Errors from marker stream operations.
Constants§
- COMMIT_
MARKER_ RECORD_ BYTES - Byte size of
CommitMarkerRecordon disk. - MARKERS_
PER_ SEGMENT - Default number of markers per segment (fixed rotation policy).
- MARKER_
FORMAT_ VERSION - Current format version.
- MARKER_
SEGMENT_ HEADER_ BYTES - Byte size of
MarkerSegmentHeaderon disk. - MARKER_
SEGMENT_ MAGIC - Magic bytes for a marker segment header: “FSMK”.
Functions§
- binary_
search_ by_ time - Binary search for the commit_seq whose
commit_time_unix_nsis the greatest value <=target_ns. ReturnsNoneif all records are aftertarget_ns. - check_
segment_ integrity - Analyze a full segment buffer for torn tail conditions.
- compute_
marker_ id - Compute marker_id:
Trunc128(BLAKE3("fsqlite:marker:v1" || prefix_bytes)). - next_
commit_ seq_ from_ file_ len - Compute the next
commit_seqfrom segment file length (crash-safe allocation). - record_
offset - Compute the byte offset of a record within a segment file.
- recover_
valid_ prefix - Recover the valid, density-checked prefix of commit markers from a segment.
- segment_
id_ for_ commit_ seq - Compute which segment a
commit_seqfalls in (fixed rotation policy). - start_
commit_ seq_ for_ segment - Compute the
start_commit_seqfor a given segment_id. - valid_
record_ prefix_ count - Scan a segment’s record region and return the count of valid (checksum-verified) records from the start. Stops at the first record that fails xxh3 verification.