(&self, mv: PlannedMove)
| 69 | #[async_trait] |
| 70 | impl MigrationDispatcher for DirectDispatcher { |
| 71 | async fn dispatch(&self, mv: PlannedMove) -> Result<()> { |
| 72 | // Simulate a completed migration by flipping the group |
| 73 | // leader to the target node. |
| 74 | { |
| 75 | let mut rt = self.routing.write().unwrap_or_else(|p| p.into_inner()); |
| 76 | rt.set_leader(mv.source_group, mv.target_node); |
| 77 | } |
| 78 | self.calls.lock().unwrap().push(mv); |
| 79 | self.fired.store(true, Ordering::SeqCst); |
| 80 | Ok(()) |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | fn topo(nodes: &[u64]) -> Arc<RwLock<ClusterTopology>> { |
nothing calls this directly
no test coverage detected