-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
MDEV-36340: Reset Connects_Tried
with Master_Retry_Count=X
#3974
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
Conversation
WHERE status_reset.Connects_Tried <> | ||
IF(LENGTH(Connection_name), status_restart.Connects_Tried, 0); | ||
IF(Connection_name = '', 0, status_change.Connects_Tried); |
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.
This format to match #3897.
Conflict Resolution: this wins.
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.
Looks good!
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.
Hi @ParadoxV5 !
Thanks for a good patch and test - I just left one question.
mi->retry_count= lex_mi->retry_count; | ||
mi->connects_tried= 0; |
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.
Would it make sense to reset this for all CHANGE MASTER
executions, rather than just when
MASTER_RETRY_COUNT
is provided? That is, if we are changing the connection parameters (e.g. MASTER_HOST
), it would make sense to me that we shouldn't report the old connects_tried
for a new connection.
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.
I say naw, because other parameters, including MASTER_HOST
and co., don’t relate to Connects_Tried
, and so have no reason to clear it when it’s intended to remain past STOP REPLICA.
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.
Looks good, thanks @ParadoxV5 !
@bnestere says in JIRA that QA’s done. Now, (still) waiting for the main branch to switch to DST… 🫤 |
Rebase failed
Rebase failed
manual update time |
CHANGE MASTER can set `Master_Retry_Count` to be lower than `Connects_Tried`, which’ll look strange to those unaware of that CHANGE. Now, setting `Master_Retry_Count` also resets `Connects_Tried` to 0. Reviewed-by: Susil Behera <susil.behera@mariadb.com> Reviewed-by: Brandon Nesterenko <brandon.nesterenko@mariadb.com>
Description
CHANGE MASTER can set
Master_Retry_Count
to be lower thanConnects_Tried
, which’ll look strange to those unaware of that CHANGE.Now, setting
Master_Retry_Count
also resetsConnects_Tried
to 0.Release Notes
Amend MDEV-35304’s with:
Connects_Tried
to 0, but RESET REPLICA does, and also does changingMaster_Retry_Count
with CHANGE MASTER.How can this PR be tested?
This PR adds a test case to
multi_source.connects_tried
.This PR also
FROM status_before JOIN status_after USING(Connection_name)
; no function changewait_for_slave_to_start
/stop.inc
tostart
/stop_slave.inc
PR quality check
The bug is about a feature exclusive to the
main
branch. Or is this a new sub-feature?main
branch.