Route explain tab plan to the proper Keyspace #10027
Merged
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.
Description
This pull request introduces
FindKeyspace
to theVSchema
interface, allowing us to route explain queries to the proper keyspace regardless if the target is a MySQL table or a Vindex table.Based on the issue reported in #10019, running a query that describes a Vindex led to a
panic
in VTGate. When running the local example to have a sharded cluster, the queries that follow used to crash:With the patch proposed in this pull request, the same queries produce the output that follows.
The MySQL error is expected as there is no
hash
table in this keyspace. Describe/explain are used to obtain information about table structure or query execution plans, not indexes.Related Issue(s)
DESC
of hash vindex #10019Checklist