Skip to content

Commit ae3a9e0

Browse files
committed
replica_rac2: fix unprotected RangeController ref
The p.mu.leader.rc field can not be accessed without holding one of the mutexes protecting it. Use the cached rd variable. Epic: none Release note: none
1 parent a572792 commit ae3a9e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kv/kvserver/kvflowcontrol/replica_rac2/processor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ func (p *processorImpl) AdmitForEval(
988988
p.opts.EvalWaitMetrics.OnBypassed(workClass, 0 /* duration */)
989989
return false, nil
990990
}
991-
return p.mu.leader.rc.WaitForEval(ctx, pri)
991+
return rc.WaitForEval(ctx, pri)
992992
}
993993

994994
func admittedIncreased(prev, next [raftpb.NumPriorities]uint64) bool {

0 commit comments

Comments
 (0)