Repository navigation
[Store] Recover drain jobs through batch OpLog - #4794
Open
SuperGoodGame wants to merge 1 commit into
Open
SuperGoodGame wants to merge 1 commit into
SuperGoodGame wants to merge 1 commit into
Conversation
SuperGoodGame
requested review from
00fish0,
Aionw,
Icedcoco,
Libotry,
XucSh,
YiXR,
stmatengss and
ykwd
as code owners
October 20, 2026 06:05
Contributor
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Failover currently loses drain jobs, client task history, and in-flight COPY/MOVE reservations. Recover them through the native batch OpLog materialized store and bounded v3 snapshot chunks, preserving task IDs, retry budgets, progress, segment maintenance state, source pins, pending quota, and existing reader leases on moved sources.
Supersedes #4481 after #4406 removed the legacy snapshot stack. Related RFC: #4431. The existing batch boundary, verified artifacts, fallback, GC/pruning, and move-only promotion handoff carry the new records; no separate job database or legacy snapshot implementation is added. Promotion also retains this state when periodic snapshots are disabled.
Ordinary metadata updates retain in-flight targets; completion, revoke, and timeout explicitly settle them. Copy/Move End keep their native visibility-before-durability contract, and source reclamation uses the native durable finalizer plus the actual outstanding reader lease. Recovery validates before publishing jobs/tasks. Unremounted segments retain exact owner/address identity and use the existing unmount/offboarding lifecycle.
Compatibility: v1/v2 snapshots remain readable. The new OpLog operations and v3 snapshots require upgraded HA master/standby consumers.
MoveStartrejects an existing incomplete target withUNAVAILABLE_IN_CURRENT_STATUS;Client::Movesurfaces that error, while restored in-flight operations retain theirEnd/Revokepaths after remount.Priority
Module
mooncake-store)Type of Change
How Has This Been Tested?
18 test executables: 416 passed, 3 existing environment skips, 0 failures. This includes all 139 HA cases and the 15-case focused check of recovery plus existing completion/finalization contracts. Three skipped cases require etcd/verification integration support absent from the CPU build.
Regressions cover double promotion without duplicated progress, retry/cancel/missing history, LOCAL_DISK updates during COPY/MOVE, quota/pins after settlement, actual reader-lease retention, orphan metrics and exact remount, unremounted unmount/offboarding, chunk corruption/fallback, suffix replay, and GC/pruning.
CPU build, four compile jobs and one link job. No live etcd/RDMA cluster test.
Checklist
AI Assistance Disclosure