Skip to main content

drain

Function drain 

Source
pub fn drain(root: &Path) -> Vec<String>
Expand description

Take every buffered line and truncate the buffer, under the compaction lock.

Returns an empty vector when the tombstone is present or the lock is held elsewhere. Truncates rather than unlinks — crates/tui/src/fleet/ledger.rs documents the rule: replacing the file leaves appenders holding the old inode.