Merge pull request #8206 from firesWu/fix/optimize-worker-tracker-lock

release worker tracker lock when call cb func
This commit is contained in:
Łukasz Magiera 2022-04-05 12:53:09 -04:00 committed by GitHub
commit e1ef1b759e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,10 @@ func (wt *workTracker) track(ctx context.Context, ready chan struct{}, wid stori
wt.lk.Lock()
delete(wt.prepared, prepID)
}
wt.lk.Unlock()
callID, err := cb()
wt.lk.Lock()
if err != nil {
return callID, err
}