Skip to content

Fixes long wait filter keyspace#6721

Merged
deepthi merged 6 commits intovitessio:masterfrom
tinyspeck:fixes-long-wait-filter-keyspace-upstream
Sep 18, 2020
Merged

Fixes long wait filter keyspace#6721
deepthi merged 6 commits intovitessio:masterfrom
tinyspeck:fixes-long-wait-filter-keyspace-upstream

Conversation

@rafael
Copy link
Copy Markdown
Member

@rafael rafael commented Sep 14, 2020

Description

  • The following PR fixes an issue with KeyspacesToWatch functionality. When this flag is provided, some keyspaces are removed. However, vtgates still try to wait for available tablet types in them. This PR makes sure that filter is respected.
  • I also added some tests around WaitForTablets for existent and new functionality.

Rafael Chacon added 2 commits September 14, 2020 17:32
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
… should be filtered

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@systay systay removed their request for review September 15, 2020 13:47
@deepthi
Copy link
Copy Markdown
Collaborator

deepthi commented Sep 15, 2020

do you know whether this also needs to be fixed on the new gateway (TabletGateway)?

@deepthi deepthi self-requested a review September 15, 2020 17:53
@rafael rafael force-pushed the fixes-long-wait-filter-keyspace-upstream branch from f024ae1 to dbfe684 Compare September 15, 2020 19:28
Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@rafael rafael force-pushed the fixes-long-wait-filter-keyspace-upstream branch from dbfe684 to 0d66346 Compare September 17, 2020 17:39
…s-long-wait-filter-keyspace-upstream

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

The implementation feels a bit fragile. We are mutating the arguments passed to an exported function. Even though existing uses of that function are such that this won't cause problems, given that it is an exported function, I feel that it is not a good idea.
How about creating a new slice that consists of only the relevant keyspaces and returning that instead of operating directly on targets?

…gateways

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@rafael
Copy link
Copy Markdown
Member Author

rafael commented Sep 17, 2020

The implementation feels a bit fragile. We are mutating the arguments passed to an exported function. Even though existing uses of that function are such that this won't cause problems, given that it is an exported function, I feel that it is not a good idea.
How about creating a new slice that consists of only the relevant keyspaces and returning that instead of operating directly on targets?

I think this is a good idea. I was on the fence because the existent code already mutates this same slice. I updated the code with your suggestion. We should probably do something similar here

Signed-off-by: Rafael Chacon <rafael@slack-corp.com>
@rafael rafael force-pushed the fixes-long-wait-filter-keyspace-upstream branch from c8241ef to b238f25 Compare September 17, 2020 22:07
Copy link
Copy Markdown
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

LGTM

@deepthi deepthi merged commit 9073c3e into vitessio:master Sep 18, 2020
ameetkotian pushed a commit to tinyspeck/vitess that referenced this pull request Sep 29, 2020
…r-keyspace-upstream

Fixes long wait filter keyspace
rafael pushed a commit to tinyspeck/vitess that referenced this pull request Oct 1, 2020
…it-filter-keyspace-upstream"

This reverts commit 6b9229e.
ameetkotian pushed a commit to tinyspeck/vitess that referenced this pull request Oct 1, 2020
…r-keyspace-upstream

Fixes long wait filter keyspace
@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