Explorar el Código

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

Xiang Li hace 11 años
padre
commit
94190286ff
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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...)
 }