-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
MDEV-36002: --master-retry-count=0 can still stop #4220
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
base: 10.11
Are you sure you want to change the base?
Conversation
If master-retry-count equals 0, the slave io will try to reconnect to the master after sleeping master-connect-retry seconds. In this case, the instructions to update reconnection counter(err_count) won't be executed, thus avoiding the err_count overflow issuse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking this on!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrelkin
gave an excellent idea on testing the overflow wraparound on the Zulip thread.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please include the default my.cnf
file (in the rpl
folder, IIRC) instead.
Then you’ll only need the master-retry-count
line.
Actually, can you include a non-zero master-retry-count
through a .combinations
file instead?
In a .combinations
file, sections specify different configs. Configs apply to all servers (both primary and replica), though the primary doesn’t care about this case.
In either case, test names should be descriptive, if available; i.e., rpl_master_retry_count
.
Include a line break at the end of the last line (where GitHub labels ⛔); thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will do it and thx for your advice. This may take some time though, as i am still getting familiar with mariadb content.
Co-authored-by: ParadoxV5 <paradox.ver5@gmail.com>
If master-retry-count equals 0, the slave io will try to reconnect to the master after sleeping master-connect-retry seconds. In this case, the instructions to update reconnection counter(err_count) won't be executed, thus avoiding the err_count overflow issuse.
Description
the patch fix the bug that when --master-retry-count=0 the reconnection can still stop for an overflow issue.
Release Notes
No update, just as kb says "A value of 0 means the replica will not stop attempting to reconnect."
How can this PR be tested?
master_retry_count is set as 0 and master_connect_retry as 1 second. The master will be shutdown for 5 seconds, during this time the replica should attempt to reconnect to the master. After 5 seconds, the master will be restarted, and the reconnection from the replica should success, which means it's Slave_IO_Running should be Yes.
Basing the PR against the correct MariaDB version
main
branch.PR quality check