mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 04:32:42 +00:00
A restore now leaves out measurement tombstones deleted longer ago than the tombstone retention. The nightly purge removes exactly those rows, the delta feed answers cursorExpired for every cursor that could still be served one, and the consolidation repairs look only inside the same horizon. Younger tombstones keep their readers (a lagging paired client, the undo of a recent delete, the repairs, the duplicate guard on re-uploaded samples) and are written as before. The backup file is unchanged. On a seeded account of 1.89 million readings whose 1.68 million tombstones were past retention, the restore on a slowed database took 5.4 min instead of 15. The rollup fold after the commit rebuilt five years of buckets under the 60 s request statement limit and could be dropped on a slow disk, leaving the charts empty until the next boot. `recomputeUserRollups` takes a `statementTimeoutMs` that scopes each aggregate and persist transaction with SET LOCAL, and the restore passes its after-commit allowance. Fixture tombstones in two round-trip tests were dated in July 2026 and had aged past the retention; they are now relative to the run.