Skip to content

Commit 36191d2

Browse files
committed
Soft-leader election mechanism for cc based on observed cluster state
Fixes #2238
1 parent 3e98771 commit 36191d2

File tree

2 files changed

+310
-145
lines changed

2 files changed

+310
-145
lines changed

crates/admin/src/cluster_controller/cluster_state_refresher.rs

+4
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,8 @@ impl ClusterStateWatcher {
235235
.map_err(|_| ShutdownError)?;
236236
Ok(Arc::clone(&self.cluster_state_watcher.borrow_and_update()))
237237
}
238+
239+
pub fn current(&self) -> Arc<ClusterState> {
240+
Arc::clone(&self.cluster_state_watcher.borrow())
241+
}
238242
}

0 commit comments

Comments
 (0)