MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / committed_meta

Function committed_meta

crates/commitlog/src/commitlog.rs:531–533  ·  view source on GitHub ↗

Extract the most recently written [CommittedMeta] from the commitlog in `repo`. Returns `None` if the commitlog is empty. Note that this function validates the most recent segment, which entails traversing it from the start. The function can be used instead of the pattern: ```ignore let log = Commitlog::open(..)?; let max_offset = log.max_committed_offset(); ``` like so: ```ignore let max_of

(repo: impl Repo)

Source from the content-addressed store, hash-verified

529///
530/// Unlike `open`, no segment will be created in an empty `repo`.
531pub fn committed_meta(repo: impl Repo) -> io::Result<Option<CommittedMeta>> {
532 CommittedMeta::extract(repo)
533}
534
535pub fn commits_from<R: Repo>(repo: R, max_log_format_version: u8, offset: u64) -> io::Result<Commits<R>> {
536 let mut offsets = repo.existing_offsets()?;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…