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] Fails to route any query when keyspace filtering is enabled #7882

Closed
setassociative opened this issue Apr 16, 2021 · 0 comments
Closed

Comments

@setassociative
Copy link
Contributor

Overview of the Issue

When we started working on online DDL support as a first-party action we introduced a dependency in the vtgate to be able to modify the topology. This conflicts with limitations enforced by a KeyspaceFilteringServer which has access to only a subset of the topo.

As a protective measure when attempting to gain access to the Write-enabled topo.Server a filtering server throws an error. Since this is now happening as part of the vcursor setup to support schema changes all vtgate routing was failing if -keyspaces_to_watch was passed to the vtgate.

Reproduction Steps

The summary:

  1. start vtgate with -keyspaces_to_watch commerce
  2. attempt to perform a query

I ended up validating my change by modifying examples/local/scripts/vttablet-up.sh to pass the keyspace filtering flag and then using the sample examples/local/101_initial_cluster.sh to bootstrap everything.

When making a query you get a result back like:

[~/vitess/examples/local] (vtgate_keyspaces_to_watch)
sa@docker $ mysql -S /tmp/mysql.sock
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.9-vitess-11.0.0-SNAPSHOT

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [(none)]> select 1 from dual;
ERROR 1105 (HY000): cannot access underlying topology server when keyspace filtering is enabled

Binary version

This is present in all releases >= 8.0, I don't recall off hand which PR actually introduced it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants