From 9cd3b2153fa48e424805a134bda5b9d6f3b8171f Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Wed, 28 May 2014 11:06:02 -0700 Subject: [PATCH] raft: comment log.nextEnts --- raft/log.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/raft/log.go b/raft/log.go index e3222011d..7cb753ec0 100644 --- a/raft/log.go +++ b/raft/log.go @@ -71,6 +71,8 @@ func (l *log) maybeCommit(maxIndex, term int) bool { return false } +// nextEnts returns all the avaliable entries for execution. +// all the returned entries will be marked as applied. func (l *log) nextEnts() (ents []Entry) { if l.commit > l.applied { ents = l.ents[l.applied+1 : l.commit+1]