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

Method sync

crates/commitlog/src/lib.rs:272–278  ·  view source on GitHub ↗

Sync all OS-buffered writes to disk. Note that this does **not** write outstanding records to disk. Use [`Self::flush_and_sync`] or call [`Self::flush`] prior to this method to ensure all data is on disk. Returns the maximum transaction offset which is considered durable after this method returns successfully. The offset is `None` if the log hasn't been flushed to disk yet. # Panics This metho

(&self)

Source from the content-addressed store, hash-verified

270 ///
271 /// This method panics if syncing fails irrecoverably.
272 pub fn sync(&self) -> Option<u64> {
273 let mut inner = self.inner.write().unwrap();
274 trace!("sync commitlog");
275 inner.sync();
276
277 inner.max_committed_offset()
278 }
279
280 /// Write all outstanding transaction records to disk.
281 ///

Callers 6

flush_and_syncMethod · 0.45
fill_logFunction · 0.45
fill_log_withFunction · 0.45
all_segments_sealedFunction · 0.45
resume_empty_segmentFunction · 0.45

Calls 3

unwrapMethod · 0.45
writeMethod · 0.45
max_committed_offsetMethod · 0.45

Tested by 5

fill_logFunction · 0.36
fill_log_withFunction · 0.36
all_segments_sealedFunction · 0.36
resume_empty_segmentFunction · 0.36