omnigraph/crates
Andrew Altshuler f75b941a9e
Make schema apply atomic across crashes (#57)
Schema apply previously committed the manifest before writing the schema
source and IR contract files. A crash in that window left the manifest
pointing at the new schema while _schema.pg, _schema.ir.json, and
__schema_state.json still reflected the old one — a silent inconsistency
that subsequent reads hit as type errors.

Reorders the apply: write to staging filenames first, commit the
manifest, then atomically rename staging → final. On open, a recovery
sweep reconciles any leftover staging files against the manifest's table
set: pre-commit crashes get the staging files deleted, post-commit
crashes get the renames completed (idempotent — handles partial
renames). Property-only migrations where both schemas imply the same
table set return an operator-actionable error rather than guessing.

Adds rename_text + delete to StorageAdapter (atomic on local FS via
tokio::fs::rename; copy + delete on S3 — recovery is tolerant of the
non-atomic case). Failpoints test coverage at both crash boundaries plus
a partial-rename scenario.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 16:21:00 +03:00
..
omnigraph Make schema apply atomic across crashes (#57) 2026-04-27 16:21:00 +03:00
omnigraph-cli Parallel per-type load writes + omnigraph optimize/cleanup CLI (#46) 2026-04-25 14:22:14 +03:00
omnigraph-compiler Parallel per-type load writes + omnigraph optimize/cleanup CLI (#46) 2026-04-25 14:22:14 +03:00
omnigraph-server Revert "Merge pull request #49 from ModernRelay/ragnorc/x-request-id" (#54) 2026-04-26 15:56:29 +03:00