Skip to main content

compact_filesystem

Function compact_filesystem 

Source
pub async fn compact_filesystem<P: IntoPolicy>(
    root: impl AsRef<Path>,
    policies: impl IntoIterator<Item = P>,
) -> Result<CompactionReport>
Expand description

Remove every record of the filesystem root at root that none of policies selects, and release its bytes in place, on a blocking thread.

The root must have no open Lace and no live arena-backed record in any process. A root holding an interrupted compaction resumes it without evaluating policies. Dropping the future stops the work at its next store operation or batch boundary; the root then resumes on the next call.