fix(#24): recover a stuck REBUILDING status after a killed reindex #25

Merged
KofTwentyTwo merged 5 commits from feature/GH-24-recover-stuck-rebuilding into develop 2026-10-12 11:05:18 +00:00
5 Commits
Author SHA1 Message Date
james.maes 4b4f73e088 Merge branch 'develop' into feature/GH-24-recover-stuck-rebuilding 2026-10-12 06:01:04 -05:00
james.maes 2e49b5d217 Merge remote-tracking branch 'origin/develop' into feature/GH-24-recover-stuck-rebuilding 2026-10-12 05:53:56 -05:00
james.maes d2c5c9b1f1 fix(#24): fail recovery when a dead run cannot be marked FAILED
Recovery now writes FAILED with an update that must succeed for every stale run record, so a new full reindex refuses to start rather than run beside a misjudged live one. Tests pin each heartbeat point and the unreadable-takeover branch.

Refs #24
2026-10-09 19:04:34 -05:00
james.maes bdb5051169 fix(#24): keep a slow captured-delete drain from touching a newer run's rows
The drain now heartbeats every batch, reads only rows up to the newest one at its start and stops once a recovery takes the run over; recovery marks dead runs FAILED last, basepull skips replayed deletes of re-created records, and the heartbeat is best effort and FULL_REINDEX only.

Refs #24
2026-10-09 18:38:33 -05:00
james.maes 59f44b43ef fix(#24): recover a stuck REBUILDING status after a killed reindex
A full reindex now refuses to start while another is alive, judged by a per-page heartbeat on its FULL_REINDEX run records. A run stale for fullReindexStaleMinutes (default 30) is recovered by the next basepull or full reindex: its records become FAILED, its tables ACTIVE, and its captured deletes PENDING for basepull.

Closes #24
2026-10-08 07:39:31 -05:00