Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Clement <[email protected]>
  • Loading branch information
clement2026 committed Sep 25, 2024
1 parent 2028c24 commit 96d8985
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/etcdserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ func (s *EtcdServer) run() {
if err != nil {
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 {
lg.Panic("failed to get first index from Raft storage", zap.Error(err))
}
Expand Down Expand Up @@ -824,7 +824,7 @@ func (s *EtcdServer) run() {
// After calling raftStorage.Compact(compacti) without errors, the dummy entry of
// raftStorage becomes {Index: compacti}, and raftStorage.FirstIndex() returns
// (compacti+1, nil). This is validated by TestMemoryStorageCompaction.
compacti: firstIndex - 1,
compacti: firstRaftIndex - 1,
}

defer func() {
Expand Down

0 comments on commit 96d8985

Please sign in to comment.