Skip to content

Getting ERROR 1236 while trying to use GTID-based sync #550

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

Closed
dobegor opened this issue Mar 12, 2021 · 3 comments
Closed

Getting ERROR 1236 while trying to use GTID-based sync #550

dobegor opened this issue Mar 12, 2021 · 3 comments

Comments

@dobegor
Copy link
Contributor

dobegor commented Mar 12, 2021

[2021/03/12 14:17:31] [info] dump.go:199 skip dump, use last binlog replication pos (, 0) or GTID set e50bd2d3-6ad7-11e9-890c-42010af0017c:1-5291126581,04dc7e08-cdb9-11ea-85e2-42010af000f0:1-529516242,6b72c712-568d-11eb-9376-4201c0a83018:1-262736262,884f7ff2-5f06-11e8-9c1f-42010af0016e:1-5801379409,946eb7a2-8009-11e6-858e-42010af0109b:1-3964676522
[2021/03/12 14:17:31] [info] binlogsyncer.go:378 begin to sync binlog from GTID set 884f7ff2-5f06-11e8-9c1f-42010af0016e:1-5801379409,946eb7a2-8009-11e6-858e-42010af0109b:1-3964676522,e50bd2d3-6ad7-11e9-890c-42010af0017c:1-5291126581,04dc7e08-cdb9-11ea-85e2-42010af000f0:1-529516242,6b72c712-568d-11eb-9376-4201c0a83018:1-262736262
[2021/03/12 14:17:31] [info] sync.go:33 start sync binlog at GTID set 946eb7a2-8009-11e6-858e-42010af0109b:1-3964676522,e50bd2d3-6ad7-11e9-890c-42010af0017c:1-5291126581,04dc7e08-cdb9-11ea-85e2-42010af000f0:1-529516242,6b72c712-568d-11eb-9376-4201c0a83018:1-262736262,884f7ff2-5f06-11e8-9c1f-42010af0016e:1-5801379409
[2021/03/12 14:17:31] [error] binlogstreamer.go:77 close sync with err: ERROR 1236 (HY000): The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires. Replicate the missing transactions from elsewhere, or provision a new slave from backup. Consider increasing the master's binary log expiration period. The GTID sets and the missing purged transactions are too long to print in this message. For more information, please see the master's error log or the manual for GTID_SUBTRACT.

GTID set that was passed: 884f7ff2-5f06-11e8-9c1f-42010af0016e:1-5801379409,946eb7a2-8009-11e6-858e-42010af0109b:1-3964676522,e50bd2d3-6ad7-11e9-890c-42010af0017c:1-5291126581,04dc7e08-cdb9-11ea-85e2-42010af000f0:1-529516242,6b72c712-568d-11eb-9376-4201c0a83018:1-262736262

mysql.gtid_executed table:

source_uuid interval_start interval_end
04dc7e08-cdb9-11ea-85e2-42010af000f0 1 529516242
6b72c712-568d-11eb-9376-4201c0a83018 1 263112632
884f7ff2-5f06-11e8-9c1f-42010af0016e 1 5801379409
946eb7a2-8009-11e6-858e-42010af0109b 1 3964676522
e50bd2d3-6ad7-11e9-890c-42010af0017c 1 5291126581
e50bd2d3-6ad7-11e9-890c-42010af0017c 5291126583 5323107666

Set was parsed using mysql.ParseGTIDSet and passed into StartFromGTID.
@siddontang I've only found one similar issue - #114 - and it seems that my case is not related?

@dobegor
Copy link
Contributor Author

dobegor commented Mar 12, 2021

Forgot to mention that GTID set was saved after the first OnPosSynced received during the dump.

@dobegor
Copy link
Contributor Author

dobegor commented Mar 12, 2021

I've edited GTID set manually (added the missing 5291126583-5323107666 interval) and replication successfully started. And more to that, OnPosSynced now receives correct GTID set:

04dc7e08-cdb9-11ea-85e2-42010af000f0:1-529516242,
6b72c712-568d-11eb-9376-4201c0a83018:1-262905290,
e50bd2d3-6ad7-11e9-890c-42010af0017c:1-5291126581:5291126583-5323107666,
884f7ff2-5f06-11e8-9c1f-42010af0016e:1-5801379409,
946eb7a2-8009-11e6-858e-42010af0109b:1-3964676522

It might be that GTID set gets incorrectly parsed during dump.

dobegor added a commit to dobegor/go-mysql that referenced this issue Mar 12, 2021
atercattus pushed a commit that referenced this issue Apr 8, 2021
This address the issue #550.

(cherry picked from commit 6f9431a7102cc23e32262dfbf7f0bb74df485545)
@dobegor
Copy link
Contributor Author

dobegor commented Jun 3, 2021

Closed in #551.

@dobegor dobegor closed this as completed Jun 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant