-
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) #2489
workerpool: remove mergeContext (#2201) #2489
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. |
@amyangfei: Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/run-all-tests |
/run-all-tests /tikv=release-5.2 |
Close this PR since it will be picked in https://github.com/pingcap/ticdc/pull/2490 |
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