Skip to content

Commit 99db0bb

Browse files
Update server/etcdserver/server.go
Co-authored-by: Marek Siarkowicz <[email protected]>
1 parent 140e81e commit 99db0bb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

server/etcdserver/server.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -818,12 +818,8 @@ func (s *EtcdServer) run() {
818818
snapi: sn.Metadata.Index,
819819
appliedt: sn.Metadata.Term,
820820
appliedi: sn.Metadata.Index,
821-
// compacti is the index from the last time raftStorage.Compact was called
822-
// without errors.
823-
//
824-
// After calling raftStorage.Compact(compacti) without errors, the dummy entry of
825-
// raftStorage becomes {Index: compacti}, and raftStorage.FirstIndex() returns
826-
// (compacti+1, nil). This is validated by TestMemoryStorageCompaction.
821+
// Compaction is inclusive, meaning compact index should be lower by one than the first index after compaction.
822+
// This is validated by TestMemoryStorageCompaction.
827823
compacti: firstRaftIndex - 1,
828824
}
829825

0 commit comments

Comments
 (0)