소스 검색

raft: fix a description of MemoryStorage.Compact

The parameter name is compactIndex, not i.
Kenji Kaneda 10 년 전
부모
커밋
ebd8cb04c1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      raft/storage.go

+ 1 - 1
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 {