Skip to content

Any chance to get mysql.GTIDSet after full dump ? #439

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
jianhaiqing opened this issue Oct 21, 2019 · 2 comments
Closed

Any chance to get mysql.GTIDSet after full dump ? #439

jianhaiqing opened this issue Oct 21, 2019 · 2 comments

Comments

@jianhaiqing
Copy link
Contributor

As you know, file-position will be stopped after master-slave switch, and it's hard to find the corresponding file-position of binlog after master-slave switch.
go-mysql-elasticsearch will exit after master-slave switch.
if mysql.GTIDSet can be recorded before mysqldump is emitted , we might have chances to continue binlog dump gtid .
Any idea ?

@jianhaiqing
Copy link
Contributor Author

Is it possible to add "--set-gtid-purged=auto" for mysqldump, and try to parse

mysqldump output including gtid:
SET @@GLOBAL.GTID_PURGED='c0977f88-3104-11e9-81e1-00505690245b:1-274559';

gtidExp = regexp.MustCompile("SET @@GLOBAL.GTID_PURGED='(.+)';")
  1. mysqldump should larger than 5.6

Any suggestion about this solution ?

jianhaiqing added a commit to jianhaiqing/go-mysql that referenced this issue Oct 24, 2019
truncate os.Hostname if lengther than 60
jianhaiqing added a commit to jianhaiqing/go-mysql that referenced this issue Oct 25, 2019
truncate os.Hostname if lengther than 60
jianhaiqing added a commit to jianhaiqing/go-mysql that referenced this issue Oct 26, 2019
siddontang pushed a commit that referenced this issue Dec 7, 2019
… startWithGTID after mysqldump is done (#444)

* add gtid set of MySQL after mysqldump #439
@jianhaiqing
Copy link
Contributor Author

fixed

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