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

vtgate routing cleanup: remove routeOptions #6531

Merged
merged 10 commits into from
Aug 18, 2020

Conversation

sougou
Copy link
Contributor

@sougou sougou commented Aug 4, 2020

I previously added an experimental feature that allowed the routing schema to provide multiple viable targets for a table (if it was materialized in other places). This would allow vtgate to choose the best option depending on the query.

The feature was implemented using the "routing options" approach. It was not a good design because it wasn't going to play well with future optimizer approaches. The main difference is that it optimizers like to try multiple options top-down, whereas routeOptions was implemented using something low level and mostly opaque. Additionally, it distorted the design of the symbol table by moving some of those elements into the routing Option.

This change removes all those complexities.

  • RoutingRules has been changed to allow at most one target per table.
  • routingOptions have been removed, and the metadata of the only alternative has been merged back into either the route or the symtab.

Along the way, I found some subtle bugs in the code that evaluates mergeability of routes, which I've fixed. I've also filed #6529 to make sure SelectNone is handled correctly.

Reduce the number of options to just one.

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

sougou commented Aug 5, 2020

This is mostly an undo of this PR #4833

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@harshit-gangal
Copy link
Member

I went ahead and resolved merge conflict.
All checks passed. so merging.

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