-
Notifications
You must be signed in to change notification settings - Fork 134
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
Problem in loop replication detection #592
Comments
|
问题重述:
|
方案2A: 遇到有osid的TX,执行前通过select @@global.gtid_executed查询
方案2B: 使用MySQL session_track_gtids功能追踪dst mysql的gtid_executed
方案3: 拓展dtle源端和目标端的功能,使其支持单job双向复制。则可以通过 |
目前倾向于方案3。需作较大调整:
TODO 考虑双向执行DDL的问题。 |
方案4: 提供选项, 执行set gtid_next, 使源端目标端gtid一致. 这需要REPLICATION_APPLIER权限(8.0) 或者 SUPER 权限 (5.7) 当gtid_next包含于gtid_executed中时, MySQL会忽略该TX的执行. |
问题4.1: set gtid_next vs DDL (implicit commit)
问题4.2: 多job复制不同表tx
则job2复制tx时, 目标端MySQL认为tx已经执行过, 会跳过执行. |
Case
A <--dtle --> B
run the 2 jobs
exec on side A
The TX is replicated to B (which is normal)
The TX is replicated to A again (which it should not), since the OSID is not A's uuid.
We should check whether a tx has been executed based on target gtid_executed instead of uuid.
The text was updated successfully, but these errors were encountered: