Skip to content

vtgate planbuilder: verify same vindex#4132

Merged
sougou merged 1 commit intovitessio:masterfrom
sougou:vindex
Aug 14, 2018
Merged

vtgate planbuilder: verify same vindex#4132
sougou merged 1 commit intovitessio:masterfrom
sougou:vindex

Conversation

@sougou
Copy link
Copy Markdown
Contributor

@sougou sougou commented Aug 14, 2018

When two parts of a query use the same unique vindex
values, we also have to check that they use the same
vindex.

Otherwise, we end up merging queries that use different
videxes but coincidentally have the same values.

I've consolidated all places that perform this check
and added the vindex check in that function.

Signed-off-by: Sugu Sougoumarane ssougou@gmail.com

@sougou sougou requested review from acharis and rafael August 14, 2018 18:56
Copy link
Copy Markdown
Member

@demmer demmer Aug 14, 2018

Choose a reason for hiding this comment

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

I actually feel like the previous error message was clearer since the case here isn't related to multiple shards per se (that's the latter case) but instead that the queries themselves aren't point queries.

How about "unsupported: UNION or subquery containing multi-shard queries"

Copy link
Copy Markdown
Member

@demmer demmer left a comment

Choose a reason for hiding this comment

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

Minor suggestion but otherwise LGTM

When two parts of a query use the same unique vindex
values, we also have to check that they use the same
vindex.

Otherwise, we end up merging queries that use different
videxes but coincidentally have the same values.

I've consolidated all places that perform this check
and added the vindex check in that function.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou
Copy link
Copy Markdown
Contributor Author

sougou commented Aug 14, 2018

Comment addressed.

Copy link
Copy Markdown
Contributor

@acharis acharis left a comment

Choose a reason for hiding this comment

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

LGTM

@sougou sougou merged commit 83d309e into vitessio:master Aug 14, 2018
@sougou sougou deleted the vindex branch August 16, 2018 01:41
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