9f2b0fd0b7
* Added the option to StopReplicationAndGetStatus() to stop only the IO Thread, and passed it all the way down the call chain to MysqlDaemon, where we can now call a new method (implemented in all flavors) which stops only the io thread, if that's what was requested. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Oops Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Remove hook per review suggestion. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Adjusted stop slave io thread to pass in a ctx because it's a new function. Adjusted StopReplicationAndGetStatus so that it stops the slave before getting slave status. This will ensure that the relay log information is correct. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Add back in logic to bail if slave is already stopped. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * We have to patch these in because after calling stop slave there won't be a master host and master port anymore when we grab slave status. Instead we need to patch in positions so we retain master host and master port, otherwise set master will assume the tablet is the master because it has no master host and master port. In retrospect its probably a bad idea that we assume no master host and no master port means we've found the master (in set master). Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Refactored per offline discussions. We now return before and after slave status, so we are more explicit, and don't nest business logic into subfields of a hybrid struct. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Fix issues that cropped up after merge conflict Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Change way we get this state to also pull in the Connecting state. We are either running, or attempting to run. Either way we are not not running. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Changed references from slave to replica per review suggestion. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Embed StopReplicationStatus into StopReplicationAndGetStatusResponse and rename fields to make it clear. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Various fixes per review suggestions. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Lets try out issuing a stop no matter what and see what happens. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Adding back in bailouts. They are necessary. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Get rid of more slave references. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Changed stopIOThreadOnly to an enum so we can change the way in which we stop replication in the future. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Add a test to ensure that we can stop the io thread only. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Fix incorrect test methodology. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Used a generated enum from proto per convention for the stop replication mode. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> * Scrub more references of slave without obfuscating MySQL statements that are being called under the hood. Signed-off-by: Peter Farr <Peter@PrismaPhonic.com> |
||
---|---|---|
.github | ||
config | ||
data/test | ||
doc | ||
docker | ||
examples | ||
go | ||
helm | ||
java | ||
misc | ||
proto | ||
support | ||
test | ||
tools | ||
vagrant-scripts | ||
vitess-mixin | ||
web/vtctld2 | ||
.codeclimate.yml | ||
.dockerignore | ||
.gitignore | ||
.gitmodules | ||
ADOPTERS.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
DCO | ||
Dockerfile | ||
GOVERNANCE.md | ||
GUIDING_PRINCIPLES.md | ||
LICENSE | ||
MAINTAINERS.md | ||
Makefile | ||
README.md | ||
SECURITY.md | ||
Vagrantfile | ||
bootstrap.sh | ||
build.env | ||
dev.env | ||
go.mod | ||
go.sum | ||
sonar-project.properties | ||
test.go |
README.md
Vitess
Vitess is a database clustering system for horizontal scaling of MySQL through generalized sharding.
By encapsulating shard-routing logic, Vitess allows application code and database queries to remain agnostic to the distribution of data onto multiple shards. With Vitess, you can even split and merge shards as your needs grow, with an atomic cutover step that takes only a few seconds.
Vitess has been a core component of YouTube's database infrastructure since 2011, and has grown to encompass tens of thousands of MySQL nodes.
For more about Vitess, please visit vitess.io.
Vitess has a growing community. You can view the list of adopters here.
Contact
Ask questions in the vitess@googlegroups.com discussion forum.
For topics that are better discussed live, please join the Vitess Slack workspace.
Subscribe to vitess-announce@googlegroups.com or the Vitess Blog for low-frequency updates like new features and releases.
Security
Reporting Security Vulnerabilities
To report a security vulnerability, please email vitess-maintainers.
See Security for a full outline of the security process.
Security Audit
A third party security audit was performed by Cure53. You can see the full report here.
License
Unless otherwise noted, the Vitess source files are distributed under the Apache Version 2.0 license found in the LICENSE file.