Skip to content

Accept the recovery worker's projection when it supersedes the test driver - #568

Merged
callumalpass merged 1 commit into
mainfrom
fix/projection-driver-superseded
Oct 3, 2026
Merged

callumalpass merged 1 commit into
mainfrom
fix/projection-driver-superseded

Conversation

@callumalpass

Copy link
Copy Markdown
Contributor

System suite (files-adversarial) fails on unrelated PRs (e.g. #502 on the current engine pin, and #567) with:

writes_with_a_current_projection_reject_duplicate_unique_values
projection advance failed: ApiError { status: 409, code: "projection_generation_not_building", … }

The test installs a type pack, which schedules recovery; the recovery projection worker races the test's own projection driver and can supersede or lease its generation. complete_projection retried only provider_database_retryable.

Fix (test-only): treat projection_generation_not_building / projection_lease_unavailable as a hand-off, exactly as the provider's own bootstrap does (provider/collections.rs): if the worker made the projection current, accept it; otherwise start a fresh generation (bounded).

Evidence: bisected the test against a disposable loopback PostgreSQL across mdbase-rs 47890a9 → 618b1f8 → ff5d77b → 056db73: it passes locally at every revision (alone and as the whole binary, --test-threads=1), and fails in CI on PRs with and without engine changes — a CI-timing race, not a regression. With this change the whole hosted_write_validation binary passes locally (5/5); clippy clean.

…river

writes_with_a_current_projection_reject_duplicate_unique_values installs a
type pack, which schedules recovery; its projection worker can supersede or
lease the generation the test drives. The driver retried only
provider_database_retryable, so CI failed with
projection_generation_not_building, including on PRs that change nothing here
(e.g. #502). Handle the hand-off as the provider's own bootstrap does: accept
a projection the worker made current, otherwise start a fresh generation.
@callumalpass
callumalpass added this pull request to the merge queue Oct 3, 2026
Merged via the queue into main with commit 15b7ac4 Oct 3, 2026
36 checks passed
@callumalpass
callumalpass deleted the fix/projection-driver-superseded branch October 3, 2026 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant