From c070a292b2e56d234781036062fd21f5ad2839aa Mon Sep 17 00:00:00 2001 From: iGxnon Date: Sat, 23 Sep 2023 19:44:32 +0800 Subject: [PATCH] chore: fix simulation & lint error Signed-off-by: iGxnon --- simulation/src/curp_group.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simulation/src/curp_group.rs b/simulation/src/curp_group.rs index d71046c4e..69ae4d15e 100644 --- a/simulation/src/curp_group.rs +++ b/simulation/src/curp_group.rs @@ -99,7 +99,9 @@ impl CurpGroup { StorageConfig::Memory, ); store_c.lock().replace(Arc::clone(&ce.store)); - let is_leader = "S0" == name; + // we will restart the old leader. + // after the reboot, it may no longer be the leader. + let is_leader = false; Rpc::run_from_addr( cluster_info.clone(),