Implement plan §2 "Adding a node to an existing group":
1. Admin API endpoints now use Rebalancer methods:
- POST /_miroir/nodes → Rebalancer.add_node()
- POST /_miroir/nodes/{id}/drain → Rebalancer.drain_node()
- DELETE /_miroir/nodes/{id} → Rebalancer.remove_node()
2. Node addition flow:
- Mark node as `joining`
- Recompute assignments → affected_shards where new node enters top-RF
- Dual-write: writes go to both old owner and new node
- Background migration via _miroir_shard filter (paginated)
- Mark `active`; stop dual-write
- Delete migrated shard from old node
3. Integration tests (p42_node_addition.rs):
- 3→4 node migration with 10K docs
- Chaos: writes during migration caught by dual-write
- Performance: ≤ total_docs/(Ng+1) × 1.1 docs moved
- Log inspection: old node not queried after migration
- Pagination verification with limit/offset
- Dual-write verification
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| cutover_race.rs | ||
| dfs_skewed_corpus.rs | ||
| p3_redis_integration.rs | ||
| p3_sqlite_restart.rs | ||
| p3_task_store_proptest.rs | ||
| p4_topology_chaos.rs | ||
| p22_write_path.rs | ||
| p23_search_read_path.rs | ||
| p42_node_addition.rs | ||
| router_proptest.proptest-regressions | ||
| router_proptest.rs | ||