Backwards compatible replication status to state transition#10167
Merged
deepthi merged 14 commits intovitessio:mainfrom Apr 29, 2022
Merged
Backwards compatible replication status to state transition#10167deepthi merged 14 commits intovitessio:mainfrom
deepthi merged 14 commits intovitessio:mainfrom
Conversation
It was NOT backwards compatible. Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
We are only appending the last io_thread_connecting field Signed-off-by: Matt Lord <mattalord@gmail.com>
1c5dc7a to
0f8d71b
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
0f8d71b to
3dd7895
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
669916a to
dd34bdc
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
965ca02 to
3defa0f
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
3defa0f to
e340dfc
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
… compatible Signed-off-by: Manan Gupta <manan@planetscale.com>
… the upgrade Signed-off-by: Manan Gupta <manan@planetscale.com>
GuptaManan100
approved these changes
Apr 29, 2022
Contributor
GuptaManan100
left a comment
There was a problem hiding this comment.
I think this all Looks good now! Maybe it is better we get a review from @deepthi too before merging
Signed-off-by: Manan Gupta <manan@planetscale.com>
Member
Author
|
LGTM! Thanks for all the help, @GuptaManan100 ! ❤️ |
3 tasks
deepthi
approved these changes
Apr 29, 2022
Collaborator
deepthi
left a comment
There was a problem hiding this comment.
lgtm.
Apologies for missing the compatibility issue on the earlier PR.
| LastSqlError: s.LastSQLError, | ||
| } | ||
|
|
||
| // We need to be able to send gRPC response messages from v14 and newer tablets to |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
It turns out that this was NOT fully backwards compatible: https://github.com/vitessio/vitess/pull/9853/files
Later ERS related upgrade/downgrade tests added in #10148 showed this. The problem was that a v14
vtctl(client:vtctlclient->vtctldorvtctl) would send an RPC to a v13vttablet(server) and thevttabletwould respond with the v13ReplicationStatusResponsemessage that does not have theIoStatusorSqlStatusfields in it so the v14vtctlwould process that response and consider the IO and SQL statuses as Unknown and be unable to proceed with some actions (such as reparenting). In order to support a v14vtctlwith v13vttablets, when processing the RPC response we need to check for an IO and SQL state of Unknown and revert to using the binary IO and SQL thread running values (the older tablets cannot tell us if the IO state was connecting).In order to support correct RPC communication between v13 and v14 we must also leave the old fields in place so that it's a clean upgrade from v13 to v14 — and the v14
vtctlwill process the olderio_thread_runningandsql_thread_runningReplicationStatusResponsefields — while adding the new fields for v14+vttabletsand clients to use. This way in v15+ we can remove the old fields and complete the transition for smooth upgrades.Related Issue(s)
Checklist