Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

appendEntry(entry, prevTerm): add entry to the local log, assuming that entry properly follows its id is one greater than that of the last entry currently in the log, and that the term of the last entry currently in the log matches prevTerm.

heartbeat(serverId, term, lastLogId, lastLogTerm): used to inform passive servers that there is a leader and that the leader is alive and well. ServerId is the id of the leader. The lastlogId and lastLogTerm arguments specify the id and term from the leader's last log entry; if these don't match the last log entry in the recipient, then it returns the id and term from its last log entry so that leader can replay missing entries.

...