Skip to content

Commit 6a60343

Browse files
committed
Add LogSize to BasicStatus
Signed-off-by: Joshua Zhang <joshua.x.zhang@gmail.com>
1 parent cc456a5 commit 6a60343

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

status.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ type BasicStatus struct {
3939
Applied uint64
4040

4141
LeadTransferee uint64
42+
43+
LogSize uint64
4244
}
4345

4446
func getProgressCopy(r *raft) map[uint64]tracker.Progress {
@@ -61,6 +63,7 @@ func getBasicStatus(r *raft) BasicStatus {
6163
s.HardState = r.hardState()
6264
s.SoftState = r.softState()
6365
s.Applied = r.raftLog.applied
66+
s.LogSize = r.raftLog.lastIndex()
6467
return s
6568
}
6669

0 commit comments

Comments
 (0)