mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #100638 from tkashem/fix-98697
apf: fix data race in queueset
This commit is contained in:
commit
b6ff1370bd
@ -285,6 +285,11 @@ func (qs *queueSet) StartRequest(ctx context.Context, hashValue uint64, flowDist
|
|||||||
// request's context's Done channel gets closed by the time
|
// request's context's Done channel gets closed by the time
|
||||||
// the request is done being processed.
|
// the request is done being processed.
|
||||||
doneCh := ctx.Done()
|
doneCh := ctx.Done()
|
||||||
|
|
||||||
|
// Retrieve the queueset configuration name while we have the lock
|
||||||
|
// and use it in the goroutine below.
|
||||||
|
configName := qs.qCfg.Name
|
||||||
|
|
||||||
if doneCh != nil {
|
if doneCh != nil {
|
||||||
qs.preCreateOrUnblockGoroutine()
|
qs.preCreateOrUnblockGoroutine()
|
||||||
go func() {
|
go func() {
|
||||||
@ -297,7 +302,7 @@ func (qs *queueSet) StartRequest(ctx context.Context, hashValue uint64, flowDist
|
|||||||
// known that the count does not need to be accurate.
|
// known that the count does not need to be accurate.
|
||||||
// BTW, the count only needs to be accurate in a test that
|
// BTW, the count only needs to be accurate in a test that
|
||||||
// uses FakeEventClock::Run().
|
// uses FakeEventClock::Run().
|
||||||
klog.V(6).Infof("QS(%s): Context of request %q %#+v %#+v is Done", qs.qCfg.Name, fsName, descr1, descr2)
|
klog.V(6).Infof("QS(%s): Context of request %q %#+v %#+v is Done", configName, fsName, descr1, descr2)
|
||||||
qs.cancelWait(req)
|
qs.cancelWait(req)
|
||||||
qs.goroutineDoneOrBlocked()
|
qs.goroutineDoneOrBlocked()
|
||||||
}()
|
}()
|
||||||
|
Loading…
Reference in New Issue
Block a user