Skip to content

Commit 7467861

Browse files
craig[bot]pav-kv
andcommitted
Merge #130381
130381: replica_rac2: fix unprotected RangeController ref r=kvoli a=pav-kv 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 Co-authored-by: Pavel Kalinnikov <[email protected]>
2 parents 1e9b4bc + ae3a9e0 commit 7467861

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
@@ -996,7 +996,7 @@ func (p *processorImpl) AdmitForEval(
996996
p.opts.EvalWaitMetrics.OnBypassed(workClass, 0 /* duration */)
997997
return false, nil
998998
}
999-
return p.mu.leader.rc.WaitForEval(ctx, pri)
999+
return rc.WaitForEval(ctx, pri)
10001000
}
10011001

10021002
// GetAdmitted implements rac2.AdmittedTracker.

0 commit comments

Comments
 (0)