Skip to content

πŸ”§ Migration runner: crash mid-up() leaves migration marked executed β€” no retry pathΒ #3992

Description

@PierreBrisorgueil

What β€” lib/services/migrations.js claims a migration as executed before up() completes; a hard process kill (OOM/SIGKILL) mid-up() leaves it permanently skipped on later boots.

Why β€” A partially-applied data migration then never finishes (surfaced reviewing #3990's backfill: an interrupted updateMany would strand a subset of docs outside the recreated unique index β€” narrow window, but the runner semantics are generic).

Scope β€” consider claim-with-status (running β†’ done) + boot-time detection of stale "running" claims (re-run or abort loud), keeping idempotence requirements on migrations documented in MIGRATIONS.md.

Found during the #3990 review (pass-2 residual, medium).
Created via /dev:issue
Scope: validated 2026-07-28

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions