[Store] Wire opt-in batch OpLog snapshots into standby runtime - #3950
Merged
Merged
Conversation
added 5 commits
September 8, 2026 14:41
added 5 commits
September 9, 2026 10:39
Icedcoco
marked this pull request as ready for review
September 9, 2026 06:30
Icedcoco
requested review from
00fish0,
Aionw,
Libotry,
XucSh,
YiXR,
stmatengss and
ykwd
as code owners
September 9, 2026 06:30
ykwd
approved these changes
Sep 9, 2026
zxpdemonio
added a commit
to zxpdemonio/Mooncake
that referenced
this pull request
Sep 10, 2026
…rix-read * origin/main: (202 commits) [Reshard] Add KV cache reshard planning (kvcache-ai#3564) [Store] Release GIL during client setup (kvcache-ai#3947) [TENT] Export EGM host memory over multi-node NVLink (opt-in) (kvcache-ai#3978) [EP] Support NCCL ElasticBuffer recovery after rank replacement (kvcache-ai#3963) [TransferEngine] Prefer THP for shared-segment mmap without a HugeTLB pool (kvcache-ai#3952) [TransferEngine] Add POSIX SHM transport for same-host DRAM copies (kvcache-ai#3918) [Store] Sweep stale handles in bounded write-lock batches (kvcache-ai#3593) [Store] Add recoverable client liveness and asynchronous offboarding (kvcache-ai#2991) [Store] Wire opt-in batch OpLog snapshots into standby runtime (kvcache-ai#3950) [Store] Structure CxlSegmentConfig environment settings (kvcache-ai#3967) [Store] Structure ClientNumaConfig environment settings (kvcache-ai#3966) [Store] Structure MmapArenaConfig environment settings (kvcache-ai#3956) [Store] Structure NoFRegisterConfig environment settings (kvcache-ai#3949) [Store] Structure NvmeKvConnectorConfig environment settings (kvcache-ai#3948) [Store] Introduce SegmentPool catalog and lifecycle (kvcache-ai#3705) TENT: deliver self-targeted notifications in-process (kvcache-ai#3464) [Integration] Fail Python init when allocator support is unavailable (kvcache-ai#2404) [Py] Fix batch_id leak on timeout and submit failure paths (kvcache-ai#2350) [Bugfix][TransferEngine] Export the requested range for dma-buf registration under CUDA VMM (fixes kvcache-ai#2511) (kvcache-ai#3538) [Store] Validate DummyClient registration of external pinned buffers (kvcache-ai#3712) ...
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
The batch OpLog snapshot components are not yet reachable from the production standby factory. This draft adds default-off
enable_oplog_snapshot, propagates chunk sizing through master configuration, and wires the batch provider/coordinator into the standby lifecycle. Artifacts use a per-cluster root. It also includes the N07 legacy promotion timeout compatibility fix and initial E2E launcher options.Related to #3167 and #3808; follows the components merged in #3794 and #3841. This implements the batch snapshot production switch, distinct from the legacy child-process shutdown work in #3942 and the broader HA refactor in #1776. It does not complete the N08 production-readiness gate.
Scope and follow-up
This PR supplies the default-off production wiring and a real-etcd primary-path gate. Static batch snapshot dependency errors now terminate supervisor startup before the admin server or leadership acquisition. The serving primary bypasses legacy snapshot stores/restore in the new mode, even when legacy flags are set. Controller shutdown joins workers before releasing dependencies.
The new
run_oplog_snapshot_smoke.shuses two real master processes, a local etcd and a persistent storage provider. It verifies two publications, multiple chunks, snapshot cold restore with a nonempty suffix, repeated standby restarts, promotion, 19 surviving objects and one removed object. It also exercises invalid local-store startup configurations and the controller lifecycle test. Launcher regression tests cover failpoint environment on/off and old run-directory defaults.The following remain for the N08 follow-up: corruption/fallback/full-replay fault matrix, crash points, competing snapshot leases, storage outage, target-hardware freeze/catch-up/RSS/upload measurements, documentation and CI/nightly integration. Passing this primary-path smoke does not establish full N08 production readiness. Human review remains pending; this PR stays draft.
Module
mooncake-store)Type of Change
How Has This Been Tested?
Tested on the current worktree with
STORE_USE_ETCD=ON, local filesystem snapshots and TCP:Results: both real-etcd runs PASS (failpoint environment disabled/enabled; no crash point armed). The second run includes the new real-etcd controller repeated Start/Stop/promotion/destructor test: 1/1. Focused bootstrap/controller tests: 9/9 before that optional test was added; final catch-up: 8/8. Launcher tests: PASS. Earlier focused results: configuration 7/7, metadata 8/8, promotion 7/7.
Both E2E runs restored snapshot seq 18 and replayed to seq 23 before promotion. Data audit: 19 successful reads, zero mismatches, one removed object absent. Test clusters were stopped and logs retained under the run directories above. The existing inspector still warns about unrecognized producer-view/snapshot control keys; this smoke separately checks snapshot pointers/artifacts and restored cursors.
Checklist
./scripts/code_format.shAI Assistance Disclosure
Codex assisted with implementation, focused tests, and this draft description. Human line-by-line review and end-to-end sign-off are pending; the human submitter remains responsible for understanding and defending all changes.