Browse Source

raft: add comment for append in unstableEntries in log.go

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

+ 1 - 0
raft/log.go

@@ -133,6 +133,7 @@ func (l *raftLog) unstableEntries() []pb.Entry {
 	if len(l.unstableEnts) == 0 {
 		return nil
 	}
+	// copy unstable entries to an empty slice
 	return append([]pb.Entry{}, l.unstableEnts...)
 }