-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tablet_picker: keep trying to find a tablet until context expires #6546
Merged
Conversation
This file contains 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
Signed-off-by: deepthi <deepthi@planetscale.com>
@sougou can you please review the tests and logging? We don't want to spam the logs but still produce useful information. |
sougou
approved these changes
Aug 6, 2020
Signed-off-by: deepthi <deepthi@planetscale.com>
…teMainflow Signed-off-by: Rohit Nayak <rohit@planetscale.com>
deepthi
commented
Aug 10, 2020
go/vt/discovery/tablet_picker.go
Outdated
@@ -80,6 +95,7 @@ func (tp *TabletPicker) PickForStreaming(ctx context.Context) (*topodatapb.Table | |||
candidates := tp.getMatchingTablets(ctx) | |||
if len(candidates) == 0 { | |||
// if no candidates were found, sleep and try again | |||
log.Infof("No tablet found for streaming, sleeping for %d", tabletPickerRetryDelay) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. I was planning to add something similar.
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: Rohit Nayak <rohit@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
deepthi
added a commit
to planetscale/vitess
that referenced
this pull request
Aug 14, 2020
…tessio#6546) * tablet_picker: keep trying to find a tablet until context expires Signed-off-by: deepthi <deepthi@planetscale.com> * tablet_picker: keyspace/shard/cells must be provided Signed-off-by: deepthi <deepthi@planetscale.com> * tablet picker: return ks/cell/shard in test result for TestShardMigrateMainflow Signed-off-by: Rohit Nayak <rohit@planetscale.com> * tablet picker: fix wrangler tests by choosing a valid source per-test Signed-off-by: Rohit Nayak <rohit@planetscale.com> * tablet picker: fix worker and testlib tests Signed-off-by: Rohit Nayak <rohit@planetscale.com> * tablet_picker: gofmted Signed-off-by: Rohit Nayak <rohit@planetscale.com> * tablet picker: fix test races Signed-off-by: Rohit Nayak <rohit@planetscale.com> * tablet picker: gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * tablet picker: gofmt Signed-off-by: Rohit Nayak <rohit@planetscale.com> * healthcheck: cleanup test code where we were setting the same flag twice Signed-off-by: deepthi <deepthi@planetscale.com> Co-authored-by: Rohit Nayak <rohit@planetscale.com>
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.
There was a bug in the tablet_picker implementation which could cause it to loop forever.
Along with fixing the above problem, this change has a few other improvements
Signed-off-by: deepthi deepthi@planetscale.com