omnigraph/crates
Devin AI b7353e1dc7 Use refresh_coordinator_only to avoid racing branch_merge's sidecar
The previous fix used `self.refresh()` to sync the restored
coordinator's cache after the swap-restore window. `refresh` runs the
`RollForwardOnly` recovery sweep — which, on the merge Err path with a
phase-B failure (sidecar written, per-table HEAD advanced, manifest
publish skipped), would observe the merge's own in-flight sidecar and
close it here.

That violates the contract documented on `Omnigraph::refresh`:

> Engine-internal callers that already hold an in-flight sidecar
> (e.g. `schema_apply` mid-write) MUST use `refresh_coordinator_only`
> to avoid the recovery sweep racing their own sidecar.

The post-restore step's purpose is to sync the coord cache with disk,
not to run recovery, so `refresh_coordinator_only` is the right
primitive on both paths. CI surfaced this via
`branch_merge_phase_b_failure_recovered_on_next_open` in
`crates/omnigraph/tests/failpoints.rs`, which asserts the sidecar
persists after the failpoint fires.

Co-Authored-By: Ragnor Comerford <ragnor.comerford@gmail.com>
2026-05-11 21:09:44 +00:00
..
omnigraph Use refresh_coordinator_only to avoid racing branch_merge's sidecar 2026-05-11 21:09:44 +00:00
omnigraph-cli release: prepare omnigraph 0.4.2 2026-05-10 14:02:28 +00:00
omnigraph-compiler release: prepare omnigraph 0.4.2 2026-05-10 14:02:28 +00:00
omnigraph-server Fix MR-923: refresh restored coordinator on merge Err path 2026-05-11 20:31:18 +00:00