Skip to content

Commit d2c54cd

Browse files
committed
kvserver: add a todo comment on raftSparseStatusRLocked
1 parent 4645c6e commit d2c54cd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/kv/kvserver/replica.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,6 +1859,9 @@ func (r *Replica) raftStatusRLocked() *raft.Status {
18591859
// raftSparseStatusRLocked returns a sparse Raft status without Config and
18601860
// Progress.Inflights which are expensive to copy, or nil if the Raft group has
18611861
// not been initialized yet. Progress is only populated on the leader.
1862+
//
1863+
// TODO(wenyihu6): odd that this is returning a pointer while holding only an
1864+
// RLock.
18621865
func (r *Replica) raftSparseStatusRLocked() *raft.SparseStatus {
18631866
rg := r.mu.internalRaftGroup
18641867
if rg == nil {

0 commit comments

Comments
 (0)