Verified plan §14.5 Mode B leader-only lease implementation: - Leader election with SQLite advisory lock (leader_lease table) - Redis SET NX EX lease support - Leader-loss mid-operation: pause; new leader reads persisted phase state - All Mode B operations are idempotent and safe to resume at phase boundaries Lease scopes (plan §14.6): - reshard:<index> - Per-index shard migration coordinator - rebalance:<index> - Rebalancer worker - alias_flip:<name> - Alias flip serializer - settings_broadcast:<index> - Two-phase settings broadcast - ilm - ILM evaluator - search_ui_key_rotation:<index> - Scoped-key rotation Acceptance tests pass (38 tests): - 3 pods: exactly one is leader at any instant - Kill leader during reshard phase 3 (verify); new leader resumes at phase 3 - Kill leader during 2PC phase 2 (verify); new leader resumes verify - miroir_leader metric sum across all pods is always 1 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| miroir-core | ||
| miroir-ctl | ||
| miroir-proxy | ||