run_consolidate_migration

Function run_consolidate_migration 

Source
pub fn run_consolidate_migration(
    conn: &mut Connection,
    data_dir: Option<&Path>,
) -> Result<ConsolidateStats, StoreError>
Expand description

Run the one-shot consolidation backfill, gated by the marker file.

data_dir is the directory that holds the marker file (typically the parent of the db/ directory). Pass None to skip marker gating — only intended for tests + in-memory stores.

Returns Ok(stats) on success (incl. the marker-already-present short-circuit). Failures roll back the active transaction and return the underlying SQLite error; the marker is NOT written.