1. Add two flags in vtctld: schemaChangeDir and schemaChangeController.
schemaChangeDir specifies a parent directory that contains schema
changes for all keyspaces.
schemaChangeController controls how to get schema change sqls from
schemaChangeDir and handle relevant schema change events.
2. Add RegisterControllerFactory in schemamanager that allows developers
to register different Controller implementations.
3. Add test case to test when schema change failed on some shards.
The idea is that sometimes a Controller implementation will take care all
keyspaces. In such case, schemamanager.Executor is not able to know keyspace
ahead.
DataSourcer and EventHandler interfaces are good but often a concrete
EventHandler implementation needs some information only exists in DataSourcer.
e.g. A DataSourcer reads schema changes from a file system and an EventHandler
wants to move this file around to response different schema change events.
The information exchange would be hard to do with two separate interfaces, as
this level of abstraction introduces more boilerplate code.
This change combines these two interface into a single one: schemamanager.Controller,
which reduces one level of abstraction and the code looks more cleaner.
The automation framework allows to automate cluster operations which
require a series of manual steps e.g. resharding.
A Cluster Operation has a list of task containers which are processed
sequentially. Each task container can contain one or more tasks which
will be executed in parallel.
Here's an example of a cluster operation with two task containers. The
second task container has two tasks:
- step 1
- step 2a | step 2b
If the task container contains one task, the task can emit new task
containers which will be inserted after the current task container. This
mechanism is used to fully expand Cluster Operations by special tasks
which emit new task containers e.g. "ReshardingTask".
This patchset implements the minimal steps to automate "resharding"
whereas task implementations for "vtctl" and "vtworker" are missing.
These will be added in later, separate commits.
Previously, the permissions of all items *within* the repository were already updated, but not the repository itself.
This resulted into the error 'cp: cannot stat `/tmp/src/*': Permission denied' when running "docker/test/run.sh mariadb".
1. Add SplitColumn field to SplitQuery so that caller could hint SplitQuery endpoint
which column is best for splitting query.
2. The split column must be indexed and this will be verified on the server side.
3. coding style fixes suggested by golint.