From 7b9922c2c0c052049229a7d1ca7a02971b70c070 Mon Sep 17 00:00:00 2001 From: dennis zhuang Date: Tue, 30 Apr 2024 17:24:16 +0800 Subject: [PATCH] chore: apply suggestion Co-authored-by: Jeremyhi --- src/meta-srv/src/service/cluster.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/meta-srv/src/service/cluster.rs b/src/meta-srv/src/service/cluster.rs index 9252eba62cb9..cf1d25b73410 100644 --- a/src/meta-srv/src/service/cluster.rs +++ b/src/meta-srv/src/service/cluster.rs @@ -128,7 +128,7 @@ impl cluster_server::Cluster for Metasrv { impl Metasrv { pub fn is_leader(&self) -> bool { - // Returns true when using memory backend. + // Returns true when there is no `election`, indicating the presence of only one `Metasrv` node, which is the leader. self.election().map(|x| x.is_leader()).unwrap_or(true) } }