From ebd8cb04c179bcc33c0811e90a1abbe43dd88d3c Mon Sep 17 00:00:00 2001 From: Kenji Kaneda Date: Tue, 6 Oct 2015 21:44:34 -0700 Subject: [PATCH] raft: fix a description of MemoryStorage.Compact The parameter name is compactIndex, not i. --- raft/storage.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raft/storage.go b/raft/storage.go index 5c9133299..904e185fc 100644 --- a/raft/storage.go +++ b/raft/storage.go @@ -193,7 +193,7 @@ func (ms *MemoryStorage) CreateSnapshot(i uint64, cs *pb.ConfState, data []byte) return ms.snapshot, nil } -// Compact discards all log entries prior to i. +// Compact discards all log entries prior to compactIndex. // It is the application's responsibility to not attempt to compact an index // greater than raftLog.applied. func (ms *MemoryStorage) Compact(compactIndex uint64) error {