Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Akira Hayakawa <ruby.wktk@gmail.com>
  • Loading branch information
akiradeveloper committed Jun 8, 2024
1 parent 1159bc1 commit 2dc1d7a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lolraft/src/process/raft_process/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,14 @@ impl RaftProcess {

self.command_log.insert_snapshot(snapshot).await?;
self.process_configuration_command(&init_command, 1).await?;
self.notify_queue();

// After this function is called
// this server should immediately become the leader by self-vote and advance commit index.
// Consequently, when initial install_snapshot is called this server is already the leader.
let conn = self.driver.connect(self.driver.self_node_id());
conn.send_timeout_now().await?;

self.notify_queue();

Ok(())
}

Expand Down

0 comments on commit 2dc1d7a

Please sign in to comment.