Skip to content

[vtadmin] Rename reparent-related RPCs, endpoints, methods, RBAC actions#10404

Merged
ajm188 merged 5 commits intovitessio:mainfrom
planetscale:andrew/vtadmin-reparent-renames
Jun 3, 2022
Merged

[vtadmin] Rename reparent-related RPCs, endpoints, methods, RBAC actions#10404
ajm188 merged 5 commits intovitessio:mainfrom
planetscale:andrew/vtadmin-reparent-renames

Conversation

@ajm188
Copy link
Copy Markdown
Contributor

@ajm188 ajm188 commented Jun 1, 2022

Description

Rename reparent-related RPCs, endpoints, methods, RBAC actions

  • EmergencyReparentShard => EmergencyFailoverShard
  • PlannedReparentShard => PlannedFailoverShard
  • ReparentTablet => RefreshTabletReplicationSource
  • TabletExternallyReparented => TabletExternallyPromoted

Related Issue(s)

Checklist

  • "Backport me!" label has been added if this change should be backported
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

- `EmergencyReparentShard` => `EmergencyFailoverShard`
- `PlannedReparentShard` => `PlannedFailoverShard`
- `ReparentTablet` => `RefreshTabletReplicationSource`
- `TabletExternallyReparented` => `TabletExternallyPromoted`

Signed-off-by: Andrew Mason <andrew@planetscale.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 1, 2022

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has the correct release notes label. release notes none should only be used for PRs that are so trivial that they need not be included.
  • If a new flag is being introduced, review whether it is really needed. The flag names should be clear and intuitive (as far as possible), and the flag's help should be descriptive.

Bug fixes

  • There should be at least one unit or end-to-end test.
  • The Pull Request description should either include a link to an issue that describes the bug OR an actual description of the bug and how to reproduce, along with a description of the fix.

Non-trivial changes

  • There should be some code comments as to why things are implemented the way they are.

New/Existing features

  • Should be documented, either by modifying the existing documentation or creating new documentation.
  • New features should have a link to a feature request issue or an RFC that documents the use cases, corner cases and test cases.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • vtctl command output order should be stable and awk-able.

@ajm188 ajm188 requested a review from deepthi June 1, 2022 13:36
@ajm188 ajm188 added this to the v14.0 milestone Jun 1, 2022
@GuptaManan100
Copy link
Copy Markdown
Contributor

Should we be doing this for vtctld commands too?

@ajm188
Copy link
Copy Markdown
Contributor Author

ajm188 commented Jun 1, 2022

Should we be doing this for vtctld commands too?

that's much more involved, and requires deprecation cycles, so i don't particularly want to spend time on that (vs letting vtadmin be the frontend that people actually use)

@ajm188 ajm188 mentioned this pull request Jun 2, 2022
3 tasks
Signed-off-by: Andrew Mason <andrew@planetscale.com>
@deepthi
Copy link
Copy Markdown
Collaborator

deepthi commented Jun 2, 2022

Should we be doing this for vtctld commands too?

that's much more involved, and requires deprecation cycles, so i don't particularly want to spend time on that (vs letting vtadmin be the frontend that people actually use)

Agreed. It's not worth the effort of changing vtctl commands.

Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

Looks fine to me, except for one small comment.


// RefreshTabletReplicationSource performs a `CHANGE REPLICATION SOURCE TO` on
// a tablet to replicate from the current primary in the shard. This only works
// if the current replica position matches the last known
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How about we delete the sentence we don't understand? I mean this part.

This only works
 // if the current replica position matches the last known
 // `CHANGE REPLICATION SOURCE TO` or failover action.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The real deal is that this function will fail if the replica you are trying to change the source on has transactions that the new "source" does not have. I don't think it is necessary to get into that detail here at all.

Andrew Mason added 3 commits June 2, 2022 15:19
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
Signed-off-by: Andrew Mason <andrew@planetscale.com>
@ajm188 ajm188 merged commit 846b3c5 into vitessio:main Jun 3, 2022
@ajm188 ajm188 deleted the andrew/vtadmin-reparent-renames branch June 3, 2022 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants