Skip to content
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: use partial result from GetTabletMap if it is available #6639

Merged
merged 2 commits into from
Aug 31, 2020

Conversation

deepthi
Copy link
Member

@deepthi deepthi commented Aug 27, 2020

Also, check for cell before cellsAlias to reduce the number of topo errors.

Signed-off-by: deepthi deepthi@planetscale.com

check for cell before cellsAlias to reduce number of topo errors.

Signed-off-by: deepthi <deepthi@planetscale.com>
@@ -157,12 +157,17 @@ func (tp *TabletPicker) getMatchingTablets(ctx context.Context) []*topo.TabletIn
// non-blocking read so that this is fast
shortCtx, cancel := context.WithTimeout(ctx, *topo.RemoteOperationTimeout)
defer cancel()
alias, err := tp.ts.GetCellsAlias(shortCtx, cell, false)
_, err := tp.ts.GetCellInfo(ctx, cell, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to use the shortCtx context here too?

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch. I'll fix it.

Signed-off-by: deepthi <deepthi@planetscale.com>
@deepthi deepthi merged commit 50b1ad4 into vitessio:master Aug 31, 2020
@deepthi deepthi deleted the ds-tp-partial-result branch September 9, 2020 23:48
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants