-
Notifications
You must be signed in to change notification settings - Fork 288
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
api(ticdc): only update upstreamInfo that has changed (#10422) #10450
api(ticdc): only update upstreamInfo that has changed (#10422) #10450
Conversation
6d22203
to
50cbbba
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 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 |
/retest |
11 similar comments
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
/retest |
50cbbba
to
2d22e7f
Compare
/test all |
/retest |
This is an automated cherry-pick of #10422
What problem does this PR solve?
Issue Number: close #10430
What is changed and how it works?
there are two apis that update or create upstream information:
And, the expected usage of these apis is:
Before this PR, when a changefeed is created, cdc always updates the uptream information, regardless of whether the uptream changes. As a result, when different ChangeFeeds are created concurrently, cdc conflicts with concurrent updates to the same upstream key.
To solve this issue, we should only update upstreamInfo that has changed when creating changefeed.
Besides, cdc did not perform any checks when updating changefeed info:
tiflow/pkg/etcd/etcd.go
Line 513 in c6b3fec
To prevent concurrent updates to the same changefeed, we should compare the versions of the info and status keys.
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