From a7d8a43c7e2f4b6f173b170d92a818da9dfe7d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=82=8E=E6=B3=BC?= Date: Thu, 15 Feb 2024 21:11:38 +0800 Subject: [PATCH] Chore: refine --- openraft/src/raft/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openraft/src/raft/mod.rs b/openraft/src/raft/mod.rs index 79ca61aa1..b495d4784 100644 --- a/openraft/src/raft/mod.rs +++ b/openraft/src/raft/mod.rs @@ -400,10 +400,13 @@ where C: RaftTypeConfig self.inner.call_core(RaftMsg::InstallCompleteSnapshot { vote, snapshot, tx }, rx).await } - /// Submit an InstallSnapshot RPC to this Raft node. + /// Receive an `InstallSnapshotRequest`. /// /// These RPCs are sent by the cluster leader in order to bring a new node or a slow node - /// up-to-speed with the leader (ยง7). + /// up-to-speed with the leader. + /// + /// If receiving is finished `done == true`, it installs the snapshot to the state machine. + /// Nothing will be done if the input snapshot is older than the state machine. #[tracing::instrument(level = "debug", skip_all)] pub async fn install_snapshot( &self,