Skip to content

tm: change how SetReadOnly is called to avoid errors from externally managed tablets#6786

Merged
sougou merged 1 commit intovitessio:masterfrom
planetscale:ds-change-ttype
Sep 25, 2020
Merged

tm: change how SetReadOnly is called to avoid errors from externally managed tablets#6786
sougou merged 1 commit intovitessio:masterfrom
planetscale:ds-change-ttype

Conversation

@deepthi
Copy link
Copy Markdown
Collaborator

@deepthi deepthi commented Sep 24, 2020

In #6762 we changed ChangeTabletType to also set read-write on MASTER instances. However, this should not be done when dealing with externally managed tablets because it will invariably fail and could cause the whole action to fail.
This PR makes it optional so that only active cluster management functions attempt to change the read_only property of the underlying DB.

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

…managed tablets

Signed-off-by: deepthi <deepthi@planetscale.com>
@deepthi deepthi requested a review from sougou as a code owner September 24, 2020 22:45
vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc"
)

// DBAction is used to tell ChangeTabletType whether to call SetReadOnly on change to
Copy link
Copy Markdown
Collaborator Author

@deepthi deepthi Sep 24, 2020

Choose a reason for hiding this comment

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

I debated not exporting this enum. However, since it is a function argument to tmState.ChangeTabletType I felt that it must be exported.

@deepthi deepthi requested a review from rafael September 24, 2020 22:47
@sougou sougou merged commit 94dce74 into vitessio:master Sep 25, 2020
@shlomi-noach shlomi-noach deleted the ds-change-ttype branch September 29, 2020 06:39
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
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