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

SchemaManager should be able to handle nil ShardInfo.MasterAlias. #1012

Merged
merged 1 commit into from
Aug 20, 2015
Merged

SchemaManager should be able to handle nil ShardInfo.MasterAlias. #1012

merged 1 commit into from
Aug 20, 2015

Conversation

yaoshengzhe
Copy link
Contributor

ShardInfo.GetShard may contain nil MasterAlias because when creating a shard,
or when scrapping the shard's master, the MasterAlias will be nil.

SchemaManager should return error in such case instead of throwing a panic.

ShardInfo.GetShard may contain nil MasterAlias because when creating a shard,
or when scrapping the shard's master, the MasterAlias will be nil.

SchemaManager should return error in such case instead of throwing a panic.
@enisoc
Copy link
Member

enisoc commented Aug 20, 2015

LGTM

yaoshengzhe added a commit that referenced this pull request Aug 20, 2015
…as_in_schemamanager

SchemaManager should be able to handle nil ShardInfo.MasterAlias.
@yaoshengzhe yaoshengzhe merged commit bcb38b7 into vitessio:master Aug 20, 2015
notfelineit pushed a commit to planetscale/vitess that referenced this pull request Sep 21, 2022
…ssio#11043) (vitessio#1012)

When reloading the database schema, a query to fetch table information and tablespace information is executed. This query can take a long time when run on a mysql instance with many tables across many databases.

We notice the impact of this query during database setup in our CI environments, as this query is executed on each DDL statement (and thus gets incrementally slower the more tables are being created).

Performance of this query was improved before in vitessio#9632 by pre-filtering the rows of the `information_schema.innodb_sys_tablespaces` before joining them to rows from `information_schema.tables`, but that change was accidentally reverted in vitessio#10703.

This brings back the pre-filtering.

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>

Signed-off-by: Arthur Schreiber <arthurschreiber@github.com>
Co-authored-by: Arthur Schreiber <arthurschreiber@github.com>
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.

2 participants