Allow multiple databases in one mysql instance#4727
Conversation
|
This is not going to work for us. We still need to be able to change the |
|
Actually this will work for us short and medium term since we don't currently share database clusters between services. So let's keep going down this path. |
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
sougou
left a comment
There was a problem hiding this comment.
On my first pass, I'm not feeling comfortable about the local_metadata change. Let's see if we can avoid changing it at all.
I'm thinking we should even kill schema swap if need be, since it's the only other tool that depends on it, and needs the db_name field.
I also don't like the bloat on the vreplication alter, but it appears unavoidable. So, let's leave that part alone.
For the record, @sougou and I discussed this at length. We decided to keep these changes so that orchestrator can be used with vitess in the multiple vttablet vs single mysql configuration. |
|
I think this PR introduces a regression when you have tablets that have a build that does not use |
It's been busy and exciting in vitess upstream. Some changes that felt worth calling out as they could impact assumptions about behavior: - vitessio#4832 — this adds a timeout that is 3x the `healthCheckInterval` which at which point the tablet will stop reporting as healthy - vitessio#4814 — this changes when command line args are used by vttablet - vitessio#4811 — a planned reparent now sets `super_read_only` - vitessio#4805 — behavior coming back from a failed backup is different **Slack changes** @demmer vitessio#4827 Correct suppress logging for begin...commit in autocommit @rafael vitessio#4824 adds timeouts for all statements @demmer vitessio#4826 adds logging of stack traces as opt-in @demmer vitessio#4819 remove begin/commit logs from autocommit txns @demmer vitessio#4796 improves support for vtexplain for begin/dml/dml/commit txns **Non slack changes** vitessio#4839 Improve behavior with reference table routing & vreplication vitessio#4833 Support query routing given there could be multiple targets for a table vitessio#4832 tablets get new health check behavior (health checks time out) vitessio#4837 refresh bug around row streamer handling creds vitessio#4830 apply a default value to the db_name attribute in local_metadata vitessio#4785 SHOW SCHEMAS aliased to SHOW DATABASES vitessio#4829 add experimental support for split clone & vertical split clone via vreplication vitessio#4822 do not normalize in order by vitessio#4791 Adds vreplication row streaming support vitessio#4814 command line flags now used regardless of management mode vitessio#4811 vttablet sets super_read_only during planned reparent vitessio#4803 xtrabackup testing vitessio#4727 support multiple vttablets running against one mysql instance vitessio#4746 TopoCat can now produce JSON output vitessio#4805 mysqld is now restarted after a failed backup vitessio#4685 macos bootstrap bug vitessio#4874 ZK opts and java land vitessio#4695 Adds support for xtrabackup vitessio#4794 fixes build failures vitessio#4725 changes mysql8.0 start args vitessio#4736 introduce new states to support vreplication vitessio#4788 expands orc error **Docs etc** vitessio#4831 lint vitessio#4827 docs vitessio#4816 const declaration cleanup vitessio#4820 const declaration cleanup vitessio#4825 docs vitessio#4818 docs vitessio#4809 docs vitessio#4812 moves consts around vitessio#4813 docs vitessio#4808 docs vitessio#4800 docs vitessio#4795 docs
As it turns out, a new tablet was deployed with a new build, and a backup was taken from that. |
|
Re orchestrator integration, we will not change the config file at |
|
One question: two keyspaces against one shard, will the orchestrator still work well as expected? |
|
if multiple database in one mysql, how to set cluster_to_watch flag, will the vtorc detecting result still ok? |
good question. vtorc must be configured to watch all keyspaces in the same mysql instance. |
We would like to allow multiple vttablets to run against the same MySQL server, with each one using a separate database/schema. The way this will be used is by having a separate schema for each keyspace.
Care needs to be taken in designating tablets as master/replica to match the underlying MySQL configuration.
For this to work, the following are needed:
Aliasin local_metadata is the tablet alias. This is used in orchestrator config to call TER for the tablet. With multiple vttablets pointing to one mysql server, in case of failover this will need to change to TER all the vttablets pointing to the new master.ClusterAliasin local_metadata is currently keyspace.shard. It is used in the Orc web UI.How to use:
Tasks:
This PR addresses the basic workflows (reparenting, resharding). It also includes the necessary changes to schema_swap code. Orchestrator and TwoPC will be addressed in forthcoming PRs.
cc @tirsen
Signed-off-by: deepthi deepthi@planetscale.com