Skip to content

Fence master maintenance on tables still using legacy worker merges - #419

Merged
beinan merged 4 commits into
mainfrom
codex/all-master-maintenance-fences
Oct 20, 2026
Merged

beinan merged 4 commits into
mainfrom
codex/all-master-maintenance-fences

Conversation

@beinan

@beinan beinan commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Masters currently bypass execution fencing for compact/index/repair on tables outside MERGE_OWNED_TARGETS. A stuck operation on a newly hot legacy table can therefore retain an untracked write even though the native recovery machinery exists.

Add an opt-in MASTER_FENCE_LEGACY_MAINTENANCE=true mode that uses the existing durable admission, real-progress watchdog, commit permits and storage recovery barrier for new rollout/generic master maintenance executions. Prepared compaction/index work keeps its separate preparation phase. The execution scope also observes successful file IO so long scans need not finish an entire phase to demonstrate progress. Recovery scans continue resolving recorded protocol-2 maintenance executions after flag rollback.

This does not change worker merge admission, enroll legacy tables into native merging, fence pre-upgrade writes, change datagen behavior, add Pods, or stop ingestion. It is the master-write prerequisite for safe automatic handoff, not a claim that handoff is complete. The flag defaults off for a measured canary rollout.

Validation: all 13 maintenance execution tests passed against isolated local etcd 3.7.0, including successful real file reads across multiple idle windows, all three stalled legacy maintenance kinds, version fencing before successor execution, flag rollback with an unresolved barrier, and preserved retry budgets. The source hashes matched the tested commit at completion. Rebased onto main after #418 merged; final-head CI is running.

@beinan
beinan force-pushed the codex/all-master-maintenance-fences branch from 487f72e to e780119 Compare October 20, 2026 23:10
@beinan
beinan changed the base branch from codex/legacy-merge-progress to main October 20, 2026 23:10
@beinan
beinan marked this pull request as ready for review October 20, 2026 23:10
@beinan
beinan merged commit 91231c8 into main Oct 20, 2026
11 of 14 checks passed
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