-
Notifications
You must be signed in to change notification settings - Fork 1k
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
separate serverID of Mariadb GTID set #852
separate serverID of Mariadb GTID set #852
Conversation
And you add some tests and comments to explain what's the new behaviour? |
I fixed some existed test case just now 494cb56 We can compare the behavior before and after by those examples. Before
Suppose there is a scenario where the user uses the same domain id and sets gtid_strict_mode=OFF. In this case, deploy multi-source synchronization of A->C and B->C. The domain ids of A and B are the same, and we cannot compare the gtid from A and B on the C machine. We can only isolate them by server id |
@okJiang i don't understand why this library needs to care about server ID. In MariaDB's source code, server ID is simply ignored when comparing https://github.com/MariaDB/server/blob/9e7afa7782314e9c5a3b3276963110d18287b783/sql/rpl_gtid.h#L54-L64 .
And in your example, no matter before or after, |
Is there such a scenario? A master-slave replication: server2(master) -> server3(slave).
|
I see your reference in tiflow's issue http://youdidwhatwithtsql.com/behavior-gtidstrictmode-mariadb/2089/ . There can exist https://mariadb.com/kb/en/gtid/#gtid_strict_mode says "Global transaction ID is designed to work correctly even when strict mode is not enabled.", so I thinnk we can learn MariaDB's behaviour on what should replication do when meets an out-of-order event. |
Sorry I'm not familiar enough with the source code of mariadb. Seems it reports some warnings and ignore it. https://github.com/MariaDB/server/blob/9e7afa7782314e9c5a3b3276963110d18287b783/sql/rpl_gtid.cc#L3479-L3508 |
If this is the case, there may be unanticipated behavior to our product because DM exists heavy reliance on binlog order. Ref pingcap/tiflow#10741 (comment) . So I hope to find a moderate way to solve this problem. Of course, I don’t want to break the rules and compatibility of mariadb. |
cc @lance6716 |
ping @lance6716 |
ref pingcap/tiflow#10741