-
Notifications
You must be signed in to change notification settings - Fork 289
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
sink(cdc): close table sinks when sink factory fails #9449
Conversation
Signed-off-by: qupeng <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: asddongmen, CharlesCheung96 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/retest-required |
/test cdc-integration-mysql-test |
1 similar comment
/test cdc-integration-mysql-test |
/retest |
/retest-required |
1 similar comment
/retest-required |
In response to a cherrypick label: new pull request created to branch |
Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created to branch |
close pingcap#9450 Signed-off-by: qupeng <[email protected]>
What problem does this PR solve?
Issue Number: close #9450
What is changed and how it works?
When sink factory fails we should close all table sinks and recycle their memory quota.
Currently it's performed in
table_sink_worker.go
, but there could be a dead lock: a table task can only enter into table sink worker after acquires memory successfully. So if memory usage has reached the max limit, no table has chance to release its memory quota usage, except it gets removed.So this PR marks table sink as closed, and releases their memory usages after sink factory fails.
Check List
Tests
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note