Skip to content

tm: call setReadOnly inside ChangeTabletType#6762

Merged
rafael merged 2 commits intovitessio:masterfrom
planetscale:ds-set-readonly
Sep 22, 2020
Merged

tm: call setReadOnly inside ChangeTabletType#6762
rafael merged 2 commits intovitessio:masterfrom
planetscale:ds-set-readonly

Conversation

@deepthi
Copy link
Copy Markdown
Collaborator

@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>
@deepthi deepthi requested a review from sougou as a code owner September 21, 2020 22:21
@deepthi deepthi requested review from enisoc and rafael September 21, 2020 22:21
Copy link
Copy Markdown
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