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 <alan.c.19971111@gmail.com>
This commit is contained in:
caojiamingalan 2023-01-26 18:36:27 -06:00 committed by Benjamin Wang
parent 3b612ce345
commit e2b8e86624

View File

@ -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