kvcache-ai / kvcache-ai/Mooncake

[Usage]: Mooncake HA: Primary-side OpLog writing not wired — by design or pending work?

Open
#2,188 3 comments 0 reactions 0 assignees View on GitHub
stale
Dominant language
C++
Stars
6.6k
Forks
1.2k
Avg merge
3d 5h
Merged PRs (30d)
312

Description

### Describe your usage question

With `enable_ha` enabled, the Leader Election and Standby OpLog replay pipeline are both implemented, but mutation RPCs (`PutEnd`, `Remove`, etc.) in `WrappedMasterService` delegate directly to `master_service_` without calling `OpLogManager::Append()` / `AppendAndPersist()`.

Specifically:

- `OpLogManager` is only instantiated in its own implementation and test files — `MasterService` / `WrappedMasterService` have no `oplog_manager_` member
- The only production usage of `enable_ha_` is in `ResolveSnapshotSequenceId()` (a read-only snapshot boundary query)
- Standby-side components (`HotStandbyService`, `OpLogApplier`, `OpLogReplicator`) are implemented but receive no entries since Primary never writes OpLog

This means after failover, a promoted Standby has empty or stale metadata and cannot serve traffic.

Is this intentional (e.g., currently validating election flow only), or is the integration still pending? If the latter, are there any plans or in-progress PRs for this?

### Before submitting a new issue...

- [ ] Make sure you already searched for relevant issues and read the [documentation](https://kvcache-ai.github.io/Mooncake/)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.