Kaynağa Gözat

raft: comment log.nextEnts

Xiang Li 11 yıl önce
ebeveyn
işleme
9cd3b2153f
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  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]