Repository navigation
Conversation
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the Mooncake Store high availability (HA) architecture into a backend-driven runtime that decouples leadership coordination, standby recovery, and metadata management, supporting both etcd and Redis backends. Key additions include a ReplicationController for managing standby states, a MasterAdminServer for independent health monitoring, and updated state persistence logic in MasterService. Feedback includes addressing a potential null pointer dereference when initializing the OpLogApplier, improving error log readability by converting error codes to strings, and optimizing heartbeat traffic during state restoration to avoid excessive network load. The PR also includes extensive updates to the deployment and design documentation.
| if (err != ErrorCode::OK) { | ||
| standby_service_->Stop(); | ||
| } |
There was a problem hiding this comment.
| return fail_restore( | ||
| fmt::format("failed to deserialize segments: {} - {}", | ||
| static_cast<int>(segments_result.error().code), | ||
| segments_result.error().message)); | ||
| } |
| int64_t total_size = 0; | ||
| for (const auto& [segment, client_id] : all_segments) { | ||
| Ping(client_id); // Add to heartbeat monitoring | ||
| Ping(client_id); |
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
Signed-off-by: Xingrui Yi <yixingrui@linux.alibaba.com>
|
This PR has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Please update the PR or comment to keep it open. |
|
This PR was closed because it has been inactive for 104 days. Feel free to reopen if you'd like to continue the work. |
Description
This PR refactors the Mooncake Store HA runtime so that master processes keep
their admin/metrics surfaces alive independently from leader-only serving, and
builds a capability-driven standby replication path on top of that runtime.
The series also hardens snapshot bootstrap / restore behavior, introduces
catalog-backed snapshot loading for HA standby recovery, adds Redis/embedded
snapshot catalog support in the common HA path, and updates the Store design and
deployment docs to match the refactored architecture.
Module
mooncake-transfer-engine)mooncake-store)mooncake-ep)mooncake-integration)mooncake-p2p-store)mooncake-wheel)mooncake-pg)mooncake-rl)Type of Change
What Changed
1. Split master runtime into always-on admin and leader-only serving
acquire/loss.
2. Introduce a replication controller and explicit standby lifecycle
ad-hoc side path.
integration surface.
3. Make snapshot bootstrap a first-class HA path
SnapshotDescriptors in HA catalogs instead of relying on aweaker latest-only view.
path.
4. Harden snapshot capture and restore semantics
latest one.
--cleanup_expired_on_restoreMC_CLEANUP_EXPIRED_ON_RESTORE5. Expand coverage and align docs
tests/ha.Why
Before this series, HA runtime state, standby bootstrap, and snapshot recovery
were still spread across multiple partially-coupled paths:
flow
were too permissive
This series makes the runtime model explicit, gives standby bootstrap a proper
place in the HA state machine, and moves snapshot-based recovery toward a
backend-neutral design.
Resulting Semantics
After this PR:
recovery
preloaded state
How Has This Been Tested?
Added or expanded coverage in the following areas:
master_metrics_testhot_standby_service_testhot_standby_snapshot_bootstrap_testreplication_controller_testcatalog_backed_snapshot_provider_testChecklist
./scripts/code_format.shbefore submitting.