Examples: Add lib functions to wait for shard states#12239
Merged
mattlord merged 11 commits intovitessio:mainfrom Feb 8, 2023
Merged
Examples: Add lib functions to wait for shard states#12239mattlord merged 11 commits intovitessio:mainfrom
mattlord merged 11 commits intovitessio:mainfrom
Conversation
Contributor
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
57dfbc7 to
3f4104e
Compare
245ce0b to
03fd3c5
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
0c1955e to
2b95544
Compare
Signed-off-by: Matt Lord <mattalord@gmail.com>
2b95544 to
eb7c7aa
Compare
frouioui
approved these changes
Feb 6, 2023
GuptaManan100
approved these changes
Feb 6, 2023
Contributor
GuptaManan100
left a comment
There was a problem hiding this comment.
looks good to me apart from the outstanding comments.
rohit-nayak-ps
approved these changes
Feb 6, 2023
Member
rohit-nayak-ps
left a comment
There was a problem hiding this comment.
Great changes, thanks!
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Also address shellcheck warnings. Signed-off-by: Matt Lord <mattalord@gmail.com>
mattlord
added a commit
to vitessio/website
that referenced
this pull request
Feb 6, 2023
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Signed-off-by: Matt Lord <mattalord@gmail.com>
Contributor
|
I was unable to backport this Pull Request to the following branches: |
mattlord
added a commit
to planetscale/vitess
that referenced
this pull request
Feb 8, 2023
* Add lib functions to wait for shard states Signed-off-by: Matt Lord <mattalord@gmail.com> * Fixup region example too Signed-off-by: Matt Lord <mattalord@gmail.com> * Address minor review comments Signed-off-by: Matt Lord <mattalord@gmail.com> * Remove extraneous line change Signed-off-by: Matt Lord <mattalord@gmail.com> * Refactor to remove duplicated files/code Also address shellcheck warnings. Signed-off-by: Matt Lord <mattalord@gmail.com> * Fix tests that run in CI Signed-off-by: Matt Lord <mattalord@gmail.com> * Use more robust location detection Signed-off-by: Matt Lord <mattalord@gmail.com> * Fix backup tests Signed-off-by: Matt Lord <mattalord@gmail.com> * Exit on shard healthy failure Signed-off-by: Matt Lord <mattalord@gmail.com> * Remove unused dups and adjust client_test and Dockerfiles Signed-off-by: Matt Lord <mattalord@gmail.com> --------- Signed-off-by: Matt Lord <mattalord@gmail.com>
frouioui
pushed a commit
that referenced
this pull request
Feb 16, 2023
* Add lib functions to wait for shard states * Fixup region example too * Address minor review comments * Remove extraneous line change * Refactor to remove duplicated files/code Also address shellcheck warnings. * Fix tests that run in CI * Use more robust location detection * Fix backup tests * Exit on shard healthy failure * Remove unused dups and adjust client_test and Dockerfiles --------- Signed-off-by: Matt Lord <mattalord@gmail.com>
3 tasks
Closed
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
Before modifying a shard we need to wait for the tablets to be up, a primary to be elected, and that primary to become healthy/serving. We were skipping this last check, but in practice it was virtually never an issue because the transition to primary after election (by
vtorcnow) was so fast. After #11520, however, once the primary has been elected it then needs to initialize its sidecar database. This additional time, while small, now makes the local examples unreliable because we do not wait for that to happen before we e.g. execute theApplySchemavtctl client command. We also did not check for any errors in vtctl client commands like that, so you would not know anything was wrong until trying to execute a later step or command and you would see that e.g. the tables did not exist. In the process, I also made the following notable changes:Related Issue(s)
Checklist