-
Notifications
You must be signed in to change notification settings - Fork 130
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
binlog loop back sync #879
Conversation
1.surport ddl one-way synchronization 2.surport dml Mutual synchronization 3.surport cluster A Mutual synchronization B,cluster B Mutual synchronization C,cluster C binlog can sync to A or not sync to A by set channel_id
modify mark table name
1.add create mark table logic
1.fix bug
/run-all-tests don't recreate pr so we can keep and trace the review comments. |
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.
fix go test bug
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.
/run-all-tests
/run-all-tests |
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.
rest LGTM
please resolve conflicts
we should add a simple integration test. maybe in another pr, I will help do it.
Please resolve the conflict. |
Merge remote-tracking branch 'upstream/master' # Conflicts: # pkg/loader/load.go
fix code format and fix some bugs;Resolving conflicts |
/run-all-tests |
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.
rest LGTM
2.rename stream_info to channel_info 3.delete updateMark function status param 4.adjust column hard code to const reference
1.adjust explanatory note for sync-ddl,loopback-control and channel-id |
/run-all-tests |
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.
rest LGTM
@suzaku PTAL
1.adjust TestUpdateMarkSQL function logic |
/run-all-tests |
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.
LGTM
@suzaku PTAL
remove comment line |
/run-all-tests |
1 similar comment
/run-all-tests |
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.
LGTM
In the AA dual activity scenario, there is data write (DML) on both sides. The data of tidb cluster on both sides needs to be synchronized with each other,but avoid loopback synchronization,and ddl is only writed one side. add three variables in drainer.toml as identification to confirm need sync ddl or not and need set sync mark identification or not and sync identification id to Avoid loopback synchronization add configuration item loopback-control (true/false) set mark table identification or not and filter txn by mark table ddl-sync (true/false) sync ddl to downstream DB or not channel-id (integer) sync identification id,avoid loopback synchronization Co-authored-by: Nihao123451 <37206498+Nihao123451@users.noreply.github.com>
* Add sync mode config (#867) allow when the column number of downstream table mismatch with current schema. For the case bidirectional replication, we will execute the DDL at one side, for add or drop column the column number will mismatch. cluster A <-> cluster B drop column of table t at cluster A some DML of table t at cluster B will miss the column dropped compared to cluster A * binlog loop back sync (#879) In the AA dual activity scenario, there is data write (DML) on both sides. The data of tidb cluster on both sides needs to be synchronized with each other,but avoid loopback synchronization,and ddl is only writed one side. add three variables in drainer.toml as identification to confirm need sync ddl or not and need set sync mark identification or not and sync identification id to Avoid loopback synchronization add configuration item loopback-control (true/false) set mark table identification or not and filter txn by mark table ddl-sync (true/false) sync ddl to downstream DB or not channel-id (integer) sync identification id,avoid loopback synchronization Co-authored-by: Nihao123451 <37206498+Nihao123451@users.noreply.github.com> Co-authored-by: freemindLi <59459626+freemindLi@users.noreply.github.com> Co-authored-by: Nihao123451 <37206498+Nihao123451@users.noreply.github.com>
recreate of #864
What problem does this PR solve?
In the AA dual activity scenario, there is data write (DML) on both sides. The data of tidb cluster on both sides needs to be synchronized with each other,but avoid loopback synchronization,and ddl is only writed one side.
What is changed and how it works?
add three variables in drainer.toml as identification to confirm need sync ddl or not and need set sync mark identification or not and sync identification id to Avoid loopback synchronization
add configuration item
loopback-control (true/false) set mark table identification or not and filter txn by mark table
ddl-sync (true/false) sync ddl to downstream DB or not
channel-id (integer) sync identification id,avoid loopback synchronization
Check List
Tests
will add in Add test case loop for mark status #882
Related changes