mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: add comment for append in unstableEntries in log.go
This commit is contained in:
parent
0a46c70f5d
commit
94190286ff
@ -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...)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user