mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
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:
parent
3b612ce345
commit
e2b8e86624
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user