зеркало из https://github.com/github/vitess-gh.git
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> |
||
---|---|---|
.. | ||
acl | ||
bucketpool | ||
bytes2 | ||
cache | ||
cacheservice | ||
cmd | ||
event | ||
exit | ||
fileutil | ||
flagutil | ||
hack | ||
history | ||
ioutil2 | ||
json2 | ||
jsonutil | ||
memcache | ||
mysql | ||
netutil | ||
pools | ||
proc | ||
race | ||
ratelimiter | ||
sqlescape | ||
sqltypes | ||
stats | ||
streamlog | ||
sync2 | ||
tb | ||
test | ||
testfiles | ||
timer | ||
trace | ||
vt | ||
vtbench | ||
yaml2 | ||
zk/zkctl | ||
README.md |
README.md
This directory contains all the Go code for Vitess.
Most of the packages at the top level are general-purpose and are suitable for use outside Vitess. Packages that are specific to Vitess are in the vt subdirectory. Binaries are in the cmd subdirectory.
Please see GoDoc for a listing of the packages and their purposes.
vt/proto contains the compiled protos for go, one per each directory. When importing these protos (for instance XXX.proto), we rename them on import to XXXpb. For instance:
import (
topodatapb "vitess.io/vitess/go/vt/proto/topodata"
)