-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
workerpool: remove mergeContext (#2201) #2488
workerpool: remove mergeContext (#2201) #2488
Conversation
[REVIEW NOTIFICATION] This pull request has not been approved. To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: d01245b
|
Codecov Report
@@ Coverage Diff @@
## release-5.1 #2488 +/- ##
================================================
Coverage ? 56.9990%
================================================
Files ? 163
Lines ? 19367
Branches ? 0
================================================
Hits ? 11039
Misses ? 7263
Partials ? 1065 |
This is an automated cherry-pick of #2201
What problem does this PR solve?
mergeContext
spawns a goroutine whenDone()
is called for the first time. Since we generate amergeContext
for each event before calling its handler, when concurrency is high, we will be running a large number of goroutines concurrently, and these goroutines do little that's useful.Close #2211
What is changed and how it works?
mergeContext
completely. Event handler calls can only be cancelled with thectx
used to add that event. They will no longer be cancelled when the workerpool is cancelled.Check List
Tests
Related changes
Release note