Getǣl — Read-only macOS home directory disk usage cartography & APFS telemetry service

Truncate SQLite WAL and reclaim freelist pages on full scans #5

Merged zip.mu.social
targeting dev from fix/sqlite-wal-bloat
Merged opened by zip.mu.social
targeting dev from fix/sqlite-wal-bloat

Resolves #1.

  • Enable PRAGMA auto_vacuum = INCREMENTAL and PRAGMA journal_size_limit = 33554432 (32 MiB) in CacheStore::init_schema.
  • After replace_full_scan commits, run PRAGMA incremental_vacuum (or PRAGMA auto_vacuum = INCREMENTAL; VACUUM; once for legacy caches) and PRAGMA wal_checkpoint(TRUNCATE) so -wal and freelist pages do not accumulate multi-GB bloat.
  • Added regression test full_scan_truncates_wal_and_reclaims_freelist_pages.

Verified: cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, and cargo test (28 unit + 2 e2e) all pass.

Commits 1

Truncate SQLite WAL and reclaim freelist pages on full scans
Sign up or Sign in to add to the discussion.