MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / write_record

Method write_record

nodedb-wal/src/double_write.rs:233–236  ·  view source on GitHub ↗

Write a WAL record to the double-write buffer before WAL append. The record is written at the current circular position and the file is fsynced immediately. Use `write_record_deferred` + `flush` for batch mode (multiple records per fsync).

(&mut self, record: &WalRecord)

Source from the content-addressed store, hash-verified

231 /// is fsynced immediately. Use `write_record_deferred` + `flush` for
232 /// batch mode (multiple records per fsync).
233 pub fn write_record(&mut self, record: &WalRecord) -> Result<()> {
234 self.write_record_deferred(record)?;
235 self.flush()
236 }
237
238 /// Write a WAL record to the DWB without fsyncing.
239 ///

Callers 3

write_and_recoverFunction · 0.80
survives_reopenFunction · 0.80

Calls 2

write_record_deferredMethod · 0.80
flushMethod · 0.45

Tested by 3

write_and_recoverFunction · 0.64
survives_reopenFunction · 0.64