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

tm: call setReadOnly inside ChangeTabletType #6762

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

deepthi
Copy link
Member

@deepthi deepthi commented Sep 21, 2020

During PlannedReparents, it is possible that a tablet advertises itself as MASTER while mysql is still read_only because ChangeTabletType triggers a health broadcast.
This PR adds a call to SetReadOnly inside ChangeTabletType when the new tablet_type is MASTER.
Remove the call from PromoteReplica since it is no longer needed there.

Signed-off-by: deepthi deepthi@planetscale.com

… advertise itself as MASTER while mysql is still read_only

Signed-off-by: deepthi <deepthi@planetscale.com>
Copy link
Member

@rafael rafael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

…cked will. Fix tests

Signed-off-by: deepthi <deepthi@planetscale.com>
@rafael rafael merged commit 336654d into vitessio:master Sep 22, 2020
ameetkotian pushed a commit to tinyspeck/vitess that referenced this pull request Sep 24, 2020
tm: call setReadOnly inside ChangeTabletType
ameetkotian pushed a commit to tinyspeck/vitess that referenced this pull request Sep 29, 2020
tm: call setReadOnly inside ChangeTabletType
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
@deepthi deepthi removed this from the v8.0 milestone Oct 26, 2020
@deepthi deepthi deleted the ds-set-readonly branch November 2, 2020 19:56
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

Successfully merging this pull request may close these issues.

3 participants