-
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
changefeed,kvClient, sink (ticdc): support bidirectional replication #7630
changefeed,kvClient, sink (ticdc): support bidirectional replication #7630
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
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. |
@@ -501,6 +502,17 @@ LOOP: | |||
cancelCtx, cancel := cdcContext.WithCancel(ctx) | |||
c.cancel = cancel | |||
|
|||
sourceID, err := pdutil.GetSourceID(ctx, c.upstream.PDClient) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not necessary to get sourced if the BDR is disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we always need it.
/run-verify |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 3994ea0
|
/run-integration-tests tidb=master tikv=master |
/run-engine-integration-test |
…gmen/ticdc into dongmen/bidirectional_replicating
/run-integration-tests |
/run-integration-tests |
/run-integration-tests |
/run-integration-tests |
/run-integration-tests |
Codecov Report
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. @@ Coverage Diff @@
## master #7630 +/- ##
================================================
+ Coverage 55.0067% 60.0106% +5.0039%
================================================
Files 415 812 +397
Lines 52739 93930 +41191
================================================
+ Hits 29010 56368 +27358
- Misses 20957 32673 +11716
- Partials 2772 4889 +2117 |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 6582b3f
|
@asddongmen: Your PR was out of date, I have automatically updated it for you. At the same time I will also trigger all tests for you: /run-all-tests If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes. 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 ti-community-infra/tichi repository. |
What problem does this PR solve?
Issue Number: close #7736
What is changed and how it works?
BDRMode
field toReplicaConfig
to config changefeed for BDR mode.filterLoop
field toCDCClient
struct, which will be used incdcpb.ChangeDataRequest
to tell the TiKV cdc component to filterrowChange
that are written by another TiCDC.source_id
of the upstream TiDB through PD client, and set it toSink
config.Note:
SET SESSION tidb_cdc_write_source = source_id;
before commit a txn, which make every txn written by TiCDC has a hidden valuetidb_cdc_write_source = source_id
. This can help TiKV cdc coponent to decide whether it should ignore a rowChange event.tidb_cdc_write_source
system variable and the user setbdr-mode = true
for a changefeed, create changefeed request will return an error.Check List
Tests
See test plan for detail.
Questions
Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?
Release note