Browse Source

raft: comment log.nextEnts

Xiang Li 11 years ago
parent
commit
9cd3b2153f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      raft/log.go

+ 2 - 0
raft/log.go

@@ -71,6 +71,8 @@ func (l *log) maybeCommit(maxIndex, term int) bool {
 	return false
 	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) {
 func (l *log) nextEnts() (ents []Entry) {
 	if l.commit > l.applied {
 	if l.commit > l.applied {
 		ents = l.ents[l.applied+1 : l.commit+1]
 		ents = l.ents[l.applied+1 : l.commit+1]