mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
apply suggestions
Signed-off-by: Clement <gh.2lgqz@aleeas.com>
This commit is contained in:
parent
2028c24677
commit
96d898579a
@ -765,7 +765,7 @@ func (s *EtcdServer) run() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
lg.Panic("failed to get snapshot from Raft storage", zap.Error(err))
|
lg.Panic("failed to get snapshot from Raft storage", zap.Error(err))
|
||||||
}
|
}
|
||||||
firstIndex, err := s.r.raftStorage.FirstIndex()
|
firstRaftIndex, err := s.r.raftStorage.FirstIndex()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
lg.Panic("failed to get first index from Raft storage", zap.Error(err))
|
lg.Panic("failed to get first index from Raft storage", zap.Error(err))
|
||||||
}
|
}
|
||||||
@ -824,7 +824,7 @@ func (s *EtcdServer) run() {
|
|||||||
// After calling raftStorage.Compact(compacti) without errors, the dummy entry of
|
// After calling raftStorage.Compact(compacti) without errors, the dummy entry of
|
||||||
// raftStorage becomes {Index: compacti}, and raftStorage.FirstIndex() returns
|
// raftStorage becomes {Index: compacti}, and raftStorage.FirstIndex() returns
|
||||||
// (compacti+1, nil). This is validated by TestMemoryStorageCompaction.
|
// (compacti+1, nil). This is validated by TestMemoryStorageCompaction.
|
||||||
compacti: firstIndex - 1,
|
compacti: firstRaftIndex - 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user