Executing the command vttablet will completely delete the existing data and
then replace it from the latest backup. The sequence of actions is basically
the same as vttablet has already used to setup a freshly started replica.
Also mysqlctl interface is extended with ReinitConfig function. It's used by
vttablet to change server_id of the replica before restoring it from backup.
That's necessary to avoid a possible situation when restored replica skips
transactions in the replication stream which have the same server_id.
The new RestoreFromBackup command will be used later in the implementation of
an automated pivot.
This change doesn't add any tests for the new functionality because I didn't
find a place where I could add these tests. Please tell me if there is actually
a place that I missed. Meanwhile I tested this manually on the example
Kubernetes setup.
Since building of docker_lite* targets doesn't make sense without building
docker_base* targets, then it would be benficial to simplify the process by
adding the dependencies of docker_lite* on docker_base* and trigger the build
by a single make command.
Documentation is adjusted accordingly. Plus I added clarification of where MySQL
flavor should be present in different commands. And added note that bootstrap
image should be re-pulled each time before an attempt to build docker_lite,
because old bootstrap image can lead to build failures with the latest vitess
sources.
1. Fix the link to Kubernetes dashboard. I guess Kubernetes changed that
recently.
2. Fix example output of ExecuteFetchAsDba, it's not in protobuf format anymore
(and another example of ExecuteFetchAsDba on this page is in the new format
already).
3. Add a comment that 'mysql' container logs don't contain MySQL error logs as
I expected when trying to execute the command. It would be nice to add a
command to show MySQL error log without doing shell access to the container,
but I don't know how to do that at the moment.