state.go
func (r *raftState) getLastIndex() uint64 {
	r.lastLock.Lock()
	defer r.lastLock.Unlock()
	return max(r.lastLogIndex, r.lastSnapshotIndex)
}
func (r *raftState) getLastIndex() uint64 {
	r.lastLock.Lock()
	defer r.lastLock.Unlock()
	return max(r.lastLogIndex, r.lastSnapshotIndex)
}
func ( r * raftState ) getLastIndex ( ) uint64 { r . lastLock . Lock ( ) defer r . lastLock . Unlock ( ) return max ( r . lastLogIndex , r . lastSnapshotIndex ) }
// getLastIndex returns the last index in stable storage.
// Either from the last log or from the last snapshot.
getLastIndex returns the last index in stable storage . Either from the last log or from the last snapshot .