Skip to content

Commit

Permalink
Update server/etcdserver/server.go
Browse files Browse the repository at this point in the history
Co-authored-by: Marek Siarkowicz <[email protected]>
  • Loading branch information
clement2026 and serathius authored Sep 25, 2024
1 parent 140e81e commit 99db0bb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions server/etcdserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -818,12 +818,8 @@ func (s *EtcdServer) run() {
snapi: sn.Metadata.Index,
appliedt: sn.Metadata.Term,
appliedi: sn.Metadata.Index,
// compacti is the index from the last time raftStorage.Compact was called
// without errors.
//
// 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.
// Compaction is inclusive, meaning compact index should be lower by one than the first index after compaction.
// This is validated by TestMemoryStorageCompaction.
compacti: firstRaftIndex - 1,
}

Expand Down

0 comments on commit 99db0bb

Please sign in to comment.