Expand description
Nightly metadata-database maintenance.
Two steps, in order:
- FTS merge — folds the many small segments a day of index writes leaves behind, and clears the tombstones the contentless index accumulates on every delete.
- space reclaim — checkpoints the WAL, refreshes query statistics, and rewrites the database only when enough of it is dead space to be worth the write lock.
Not per tenant. meta.db is one global file and both FTS indexes span every
tenant, so a tenant loop would repeat identical whole-database work.
Structs§
- DbMaintenance
Task - Meta-database maintenance. Scheduled via cron at process start, and on
demand from
POST /api/admin/db-maintenance.