From 843c53192a0c53f653e107f708111f692413d05e Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Sun, 5 Jun 2016 17:47:46 -0700 Subject: [PATCH] raft: small fix in doc 'MsgBeat' is an internal type to signal the leader, not the message type that gets sent to its followers. 'MsgHeartbeat' is the type sent to followers. --- raft/doc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/raft/doc.go b/raft/doc.go index a86af8578..a071932ae 100644 --- a/raft/doc.go +++ b/raft/doc.go @@ -210,10 +210,10 @@ stale log entries: passes 'MsgHup' to its Step method and becomes (or remains) a candidate to start a new election. - 'MsgBeat' is an internal type that signals leaders to send a heartbeat of + 'MsgBeat' is an internal type that signals the leader to send a heartbeat of the 'MsgHeartbeat' type. If a node is a leader, the 'tick' function in - the 'raft' struct is set as 'tickHeartbeat', and sends periodic heartbeat - messages of the 'MsgBeat' type to its followers. + the 'raft' struct is set as 'tickHeartbeat', and triggers the leader to + send periodic 'MsgHeartbeat' messages to its followers. 'MsgProp' proposes to append data to its log entries. This is a special type to redirect proposals to leader. Therefore, send method overwrites