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

Method reset

crates/commitlog/src/lib.rs:409–414  ·  view source on GitHub ↗

Remove all data from the log and reopen it. Log segments are deleted starting from the newest. As multiple segments cannot be deleted atomically, the log may not be completely empty if the method returns an error. Note that the method consumes `self` to ensure the log is not modified while resetting.

(self)

Source from the content-addressed store, hash-verified

407 /// Note that the method consumes `self` to ensure the log is not modified
408 /// while resetting.
409 pub fn reset(self) -> io::Result<Self> {
410 let inner = self.inner.into_inner().unwrap().reset()?;
411 Ok(Self {
412 inner: RwLock::new(inner),
413 })
414 }
415
416 /// Remove all data past the given transaction `offset` from the log and
417 /// reopen it.

Callers 2

execFunction · 0.45
format_log_recordFunction · 0.45

Calls 4

OkFunction · 0.50
newFunction · 0.50
unwrapMethod · 0.45
into_innerMethod · 0.45

Tested by

no test coverage detected