From e2b8e86624742bcd0522bfa0209232eb7696b9d2 Mon Sep 17 00:00:00 2001 From: caojiamingalan Date: Thu, 26 Jan 2023 18:36:27 -0600 Subject: [PATCH] etcdserver: correct the old name of notifyc in comments The old name(raftDone) of the channel(notifyc) which indicates the apply has been completed is left unchanged in the comments, resulting in confusion when reading the source code. Signed-off-by: caojiamingalan --- server/etcdserver/raft.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/etcdserver/raft.go b/server/etcdserver/raft.go index d111081be..6e50b417f 100644 --- a/server/etcdserver/raft.go +++ b/server/etcdserver/raft.go @@ -65,7 +65,7 @@ func init() { // toApply contains entries, snapshot to be applied. Once // an toApply is consumed, the entries will be persisted to // to raft storage concurrently; the application must read -// raftDone before assuming the raft messages are stable. +// notifyc before assuming the raft messages are stable. type toApply struct { entries []raftpb.Entry snapshot raftpb.Snapshot @@ -269,7 +269,7 @@ func (r *raftNode) start(rh *raftReadyHandler) { r.raftStorage.Append(rd.Entries) if !islead { - // finish processing incoming messages before we signal raftdone chan + // finish processing incoming messages before we signal notifyc chan msgs := r.processMessages(rd.Messages) // now unblocks 'applyAll' that waits on Raft log disk writes before triggering snapshots