Skip to content

Simply Replication Status proto conversions#10926

Merged
GuptaManan100 merged 5 commits intovitessio:mainfrom
planetscale:simplify-replication-thread-status
Aug 8, 2022
Merged

Simply Replication Status proto conversions#10926
GuptaManan100 merged 5 commits intovitessio:mainfrom
planetscale:simplify-replication-thread-status

Conversation

@GuptaManan100
Copy link
Copy Markdown
Contributor

@GuptaManan100 GuptaManan100 commented Aug 4, 2022

Description

Since v14 has happened, we can simplify the proto to and from conversions of ReplicationStatus. The test for the same has also been changed to only expect the IOState and SqlState to be specified.

The proto fields of io_thread_running and sql_thread_running have been marked reserved.

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

Signed-off-by: Manan Gupta <manan@planetscale.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
@GuptaManan100 GuptaManan100 added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: Cluster management labels Aug 4, 2022
@vitess-bot
Copy link
Copy Markdown
Contributor

vitess-bot bot commented Aug 4, 2022

Review Checklist

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

General

  • Ensure that the Pull Request has a descriptive title.
  • If this is a change that users need to know about, please apply the release notes (needs details) label so that merging is blocked unless the summary release notes document is 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.
  • If a workflow is added or modified, each items in Jobs should be named in order to mark it as required. If the workflow should be required, the GitHub Admin should be notified.

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.

Signed-off-by: Manan Gupta <manan@planetscale.com>
Copy link
Copy Markdown
Member

@mattlord mattlord left a comment

Choose a reason for hiding this comment

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

Thank you for doing this! Since I think we're now essentially reverting this: #10167

There's some other stuff we could also remove (e.g. the interim test that was added there)

string position = 1;
// These fields should be removed in Vitess 15+ and fully replaced by the io_state and sql_state fields
// reserved 2, 3;
// reserved "io_thread_running", "sql_thread_running";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should add this too, no? While we don't have to, it will prevent re-using these names.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Is re-using a name not correct in proto?

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.

Names don't really matter for the wire protocol, it is the numbers. The only time names come into play is when a proto is converted to JSON. I'm iffy about whether it is a good idea to re-use names, but we have not reserved them for any of the ones we removed in the past. In that sense this PR is fine.

string position = 1;
// These fields should be removed in Vitess 15+ and fully replaced by the io_state and sql_state fields
// reserved 2, 3;
// reserved "io_thread_running", "sql_thread_running";
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.

Names don't really matter for the wire protocol, it is the numbers. The only time names come into play is when a proto is converted to JSON. I'm iffy about whether it is a good idea to re-use names, but we have not reserved them for any of the ones we removed in the past. In that sense this PR is fine.

@deepthi
Copy link
Copy Markdown
Collaborator

deepthi commented Aug 4, 2022

There's some other stuff we could also remove (e.g. the interim test that was added there)

Should probably wait until this is addressed before merging.

Signed-off-by: Manan Gupta <manan@planetscale.com>
…n-thread-status

Signed-off-by: Manan Gupta <manan@planetscale.com>
Copy link
Copy Markdown
Member

@mattlord mattlord left a comment

Choose a reason for hiding this comment

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

Thanks again, @GuptaManan100 !

@GuptaManan100 GuptaManan100 merged commit 71cf144 into vitessio:main Aug 8, 2022
@GuptaManan100 GuptaManan100 deleted the simplify-replication-thread-status branch August 8, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Cluster management Type: Enhancement Logical improvement (somewhere between a bug and feature)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants