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

Method maybe_flush

nodedb/src/engine/array/write.rs:77–87  ·  view source on GitHub ↗
(&mut self, id: &ArrayId)

Source from the content-addressed store, hash-verified

75 }
76
77 pub(super) fn maybe_flush(&mut self, id: &ArrayId) -> ArrayEngineResult<()> {
78 let stats = self.store(id)?.memtable.stats();
79 if stats.cell_count >= self.cfg.flush_cell_threshold {
80 // Auto-flush in the threshold path uses an LSN of 0 — the
81 // caller's WAL-side flush record (if any) carries the real
82 // watermark; auto-flushes are always followed by another
83 // explicit Flush from the Control Plane in production.
84 self.flush(id, 0)?;
85 }
86 Ok(())
87 }
88}
89
90/// Shared memtable-stamping core for puts. Recovery routes through here

Callers 2

put_cellsMethod · 0.80
delete_cellsMethod · 0.80

Calls 3

statsMethod · 0.45
storeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected