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

Method min_committed_offset

crates/commitlog/src/commitlog.rs:174–179  ·  view source on GitHub ↗

The first transaction offset written to disk, or `None` if nothing has been written yet.

(&self)

Source from the content-addressed store, hash-verified

172 /// The first transaction offset written to disk, or `None` if nothing has
173 /// been written yet.
174 pub fn min_committed_offset(&self) -> Option<u64> {
175 self.tail
176 .first()
177 .copied()
178 .or_else(|| (!self.head.is_empty()).then(|| self.head.min_tx_offset()))
179 }
180
181 // Helper to obtain a list of the segment offsets which include transaction
182 // offset `offset`.

Callers

nothing calls this directly

Calls 2

min_tx_offsetMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected