Skip to content
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

Defining mysql replication Heartbeet Event period from the secondary #110

Open
darnuria opened this issue Nov 11, 2023 · 1 comment
Open

Comments

@darnuria
Copy link

darnuria commented Nov 11, 2023

Hey,

For the work I implemented defining the Heartbeet frequency from the client.

I don't know if it's something that is worth implementing here but it's technically possible (and already in production).

It's done this way in pymysql replication :

https://github.com/julien-duponchelle/python-mysql-replication/blob/main/pymysqlreplication/binlogstream.py#L364-L377

I did it in Rust for day-job and worked fine. (Will edit on day-job time to share the snippet but it's weekend now! ;))

Mysql code:
https://github.com/mysql/mysql-server/blob/87307d4ddd88405117e3f1e51323836d57ab1f57/sql/rpl_binlog_sender.cc#L847-L857

But on mysql 5.7 percona the modified setting didn't shown up with tools to check session variables like heart_beat_period.

Didn't tested if it's correctly updated on 8.0.

Feel free to close if it's outside the scope of the lib or should be moved to network-impl crates. :)

@darnuria
Copy link
Author

Update it look like this worked with percona8 with it's docker image

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