Tablet Manager: Add Option To Stop IO Thread Only (#6335)

* 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>
This commit is contained in:
Peter Farr 2020-07-08 14:01:17 -07:00 коммит произвёл GitHub
Родитель 3e0b0a2a48
Коммит 9f2b0fd0b7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
22 изменённых файлов: 489 добавлений и 216 удалений

Просмотреть файл

@ -65,6 +65,9 @@ type flavor interface {
// stopReplicationCommand returns the command to stop the replication.
stopReplicationCommand() string
// stopIOThreadCommand returns the command to stop the replica's io thread only.
stopIOThreadCommand() string
// sendBinlogDumpCommand sends the packet required to start
// dumping binlogs from the specified location.
sendBinlogDumpCommand(c *Conn, serverID uint32, startPos Position) error
@ -195,6 +198,11 @@ func (c *Conn) StopReplicationCommand() string {
return c.flavor.stopReplicationCommand()
}
// StopIOThreadCommand returns the command to stop the replica's io thread.
func (c *Conn) StopIOThreadCommand() string {
return c.flavor.stopIOThreadCommand()
}
// SendBinlogDumpCommand sends the flavor-specific version of
// the COM_BINLOG_DUMP command to start dumping raw binlog
// events over a server connection, starting at a given GTID.
@ -277,7 +285,7 @@ func parseReplicationStatus(fields map[string]string) ReplicationStatus {
status := ReplicationStatus{
MasterHost: fields["Master_Host"],
// These fields are returned from the underlying DB and cannot be renamed
IOThreadRunning: fields["Slave_IO_Running"] == "Yes",
IOThreadRunning: fields["Slave_IO_Running"] == "Yes" || fields["Slave_IO_Running"] == "Connecting",
SQLThreadRunning: fields["Slave_SQL_Running"] == "Yes",
}
parseInt, _ := strconv.ParseInt(fields["Master_Port"], 10, 0)

Просмотреть файл

@ -75,6 +75,10 @@ func (flv *filePosFlavor) stopReplicationCommand() string {
return "unsupported"
}
func (flv *filePosFlavor) stopIOThreadCommand() string {
return "unsupported"
}
// sendBinlogDumpCommand is part of the Flavor interface.
func (flv *filePosFlavor) sendBinlogDumpCommand(c *Conn, serverID uint32, startPos Position) error {
rpos, ok := startPos.GTIDSet.(filePosGTID)

Просмотреть файл

@ -63,6 +63,10 @@ func (mariadbFlavor) stopReplicationCommand() string {
return "STOP SLAVE"
}
func (mariadbFlavor) stopIOThreadCommand() string {
return "STOP SLAVE IO_THREAD"
}
// sendBinlogDumpCommand is part of the Flavor interface.
func (mariadbFlavor) sendBinlogDumpCommand(c *Conn, serverID uint32, startPos Position) error {
// Tell the server that we understand GTIDs by setting

Просмотреть файл

@ -62,6 +62,10 @@ func (mysqlFlavor) stopReplicationCommand() string {
return "STOP SLAVE"
}
func (mysqlFlavor) stopIOThreadCommand() string {
return "STOP SLAVE IO_THREAD"
}
// sendBinlogDumpCommand is part of the Flavor interface.
func (mysqlFlavor) sendBinlogDumpCommand(c *Conn, serverID uint32, startPos Position) error {
gtidSet, ok := startPos.GTIDSet.(Mysql56GTIDSet)

Просмотреть файл

@ -300,6 +300,13 @@ func (fmd *FakeMysqlDaemon) StopReplication(hookExtraEnv map[string]string) erro
})
}
// StopIOThread is part of the MysqlDaemon interface.
func (fmd *FakeMysqlDaemon) StopIOThread(ctx context.Context) error {
return fmd.ExecuteSuperQueryList(context.Background(), []string{
"STOP SLAVE IO_THREAD",
})
}
// SetReplicationPosition is part of the MysqlDaemon interface.
func (fmd *FakeMysqlDaemon) SetReplicationPosition(ctx context.Context, pos mysql.Position) error {
if !reflect.DeepEqual(fmd.SetReplicationPositionPos, pos) {

Просмотреть файл

@ -22,6 +22,7 @@ import (
"os"
"strings"
"testing"
"vitess.io/vitess/go/vt/dbconfigs"
"vitess.io/vitess/go/vt/servenv"
)

Просмотреть файл

@ -45,6 +45,7 @@ type MysqlDaemon interface {
RestartReplication(hookExtraEnv map[string]string) error
StartReplicationUntilAfter(ctx context.Context, pos mysql.Position) error
StopReplication(hookExtraEnv map[string]string) error
StopIOThread(ctx context.Context) error
ReplicationStatus() (mysql.ReplicationStatus, error)
SetSemiSyncEnabled(master, replica bool) error
SemiSyncEnabled() (master, replica bool)

Просмотреть файл

@ -114,6 +114,17 @@ func (mysqld *Mysqld) StopReplication(hookExtraEnv map[string]string) error {
return mysqld.executeSuperQueryListConn(ctx, conn, []string{conn.StopReplicationCommand()})
}
// StopIOThread stops a replica's IO thread only.
func (mysqld *Mysqld) StopIOThread(ctx context.Context) error {
conn, err := getPoolReconnect(ctx, mysqld.dbaPool)
if err != nil {
return err
}
defer conn.Recycle()
return mysqld.executeSuperQueryListConn(ctx, conn, []string{conn.StopIOThreadCommand()})
}
// RestartReplication stops, resets and starts replication.
func (mysqld *Mysqld) RestartReplication(hookExtraEnv map[string]string) error {
h := hook.NewSimpleHook("preflight_stop_slave")

Просмотреть файл

@ -21,6 +21,32 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// StopReplicationMode is used to provide controls over how replication is stopped.
type StopReplicationMode int32
const (
StopReplicationMode_IOANDSQLTHREAD StopReplicationMode = 0
StopReplicationMode_IOTHREADONLY StopReplicationMode = 1
)
var StopReplicationMode_name = map[int32]string{
0: "IOANDSQLTHREAD",
1: "IOTHREADONLY",
}
var StopReplicationMode_value = map[string]int32{
"IOANDSQLTHREAD": 0,
"IOTHREADONLY": 1,
}
func (x StopReplicationMode) String() string {
return proto.EnumName(StopReplicationMode_name, int32(x))
}
func (StopReplicationMode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ee8ee22b8c4b9d06, []int{0}
}
// Status is the replication status for MySQL/MariaDB/File-based. Returned by a
// flavor-specific command and parsed into a Position and fields.
type Status struct {
@ -151,35 +177,91 @@ func (m *Status) GetMasterUuid() string {
return ""
}
// StopReplicationStatus represents the replication status before calling StopReplication, and the replication status collected immediately after
// calling StopReplication.
type StopReplicationStatus struct {
Before *Status `protobuf:"bytes,1,opt,name=before,proto3" json:"before,omitempty"`
After *Status `protobuf:"bytes,2,opt,name=after,proto3" json:"after,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StopReplicationStatus) Reset() { *m = StopReplicationStatus{} }
func (m *StopReplicationStatus) String() string { return proto.CompactTextString(m) }
func (*StopReplicationStatus) ProtoMessage() {}
func (*StopReplicationStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_ee8ee22b8c4b9d06, []int{1}
}
func (m *StopReplicationStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StopReplicationStatus.Unmarshal(m, b)
}
func (m *StopReplicationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StopReplicationStatus.Marshal(b, m, deterministic)
}
func (m *StopReplicationStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_StopReplicationStatus.Merge(m, src)
}
func (m *StopReplicationStatus) XXX_Size() int {
return xxx_messageInfo_StopReplicationStatus.Size(m)
}
func (m *StopReplicationStatus) XXX_DiscardUnknown() {
xxx_messageInfo_StopReplicationStatus.DiscardUnknown(m)
}
var xxx_messageInfo_StopReplicationStatus proto.InternalMessageInfo
func (m *StopReplicationStatus) GetBefore() *Status {
if m != nil {
return m.Before
}
return nil
}
func (m *StopReplicationStatus) GetAfter() *Status {
if m != nil {
return m.After
}
return nil
}
func init() {
proto.RegisterEnum("replicationdata.StopReplicationMode", StopReplicationMode_name, StopReplicationMode_value)
proto.RegisterType((*Status)(nil), "replicationdata.Status")
proto.RegisterType((*StopReplicationStatus)(nil), "replicationdata.StopReplicationStatus")
}
func init() { proto.RegisterFile("replicationdata.proto", fileDescriptor_ee8ee22b8c4b9d06) }
var fileDescriptor_ee8ee22b8c4b9d06 = []byte{
// 353 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x41, 0x4f, 0xe2, 0x40,
0x14, 0xc7, 0xd3, 0x65, 0x61, 0x61, 0x80, 0x85, 0x9d, 0x85, 0x38, 0xf1, 0x62, 0xa3, 0x97, 0xc6,
0x10, 0x6a, 0x34, 0x7e, 0x01, 0xbc, 0x68, 0xa2, 0x09, 0x29, 0x7a, 0xf1, 0x32, 0x29, 0x9d, 0xb1,
0x4c, 0x52, 0xe7, 0x95, 0x99, 0x29, 0x09, 0x9f, 0xdd, 0x8b, 0xe9, 0x2b, 0x20, 0x36, 0xde, 0xda,
0xff, 0xef, 0x97, 0xd7, 0xd7, 0x7f, 0x1e, 0x19, 0x1b, 0x99, 0x67, 0x2a, 0x89, 0x9d, 0x02, 0x2d,
0x62, 0x17, 0x4f, 0x73, 0x03, 0x0e, 0xe8, 0xa0, 0x16, 0x9f, 0x7f, 0x34, 0x48, 0x6b, 0xe1, 0x62,
0x57, 0x58, 0x7a, 0x4a, 0xda, 0x39, 0x58, 0x55, 0x22, 0xe6, 0xf9, 0x5e, 0xd0, 0x89, 0x0e, 0xef,
0xf4, 0x92, 0xfc, 0x53, 0xc0, 0xdd, 0xca, 0xc8, 0x58, 0x70, 0x53, 0x68, 0xad, 0x74, 0xca, 0x7e,
0xf9, 0x5e, 0xd0, 0x8e, 0x06, 0x0a, 0x9e, 0x31, 0x8f, 0xaa, 0x98, 0x4e, 0x08, 0xb5, 0xeb, 0xac,
0x2e, 0x37, 0x50, 0x1e, 0xda, 0x75, 0xf6, 0xdd, 0xbe, 0x26, 0x63, 0x2b, 0x13, 0xd0, 0xc2, 0xf2,
0xa5, 0x5c, 0x29, 0x2d, 0xf8, 0x7b, 0x6c, 0x9d, 0x34, 0xec, 0xb7, 0xef, 0x05, 0xfd, 0xe8, 0xff,
0x0e, 0xce, 0x90, 0x3d, 0x21, 0xa2, 0x67, 0xa4, 0x5b, 0x49, 0x7c, 0x05, 0xd6, 0xb1, 0x26, 0x2e,
0x4b, 0xaa, 0xe8, 0x1e, 0xac, 0x3b, 0x12, 0x72, 0x30, 0x8e, 0xb5, 0x7c, 0x2f, 0x68, 0xee, 0x85,
0x39, 0x18, 0x47, 0xaf, 0xc8, 0x68, 0x27, 0x24, 0xa0, 0xb5, 0x4c, 0x1c, 0x37, 0xd2, 0x99, 0x2d,
0xfb, 0x83, 0x26, 0xad, 0xd8, 0x5d, 0x85, 0xa2, 0x92, 0x94, 0x7f, 0x65, 0x64, 0x16, 0x6f, 0x79,
0x06, 0x29, 0x3f, 0xf4, 0xd4, 0xc6, 0x4f, 0x0f, 0x91, 0x3c, 0x42, 0x3a, 0xdf, 0xf7, 0x75, 0x41,
0xfa, 0x6f, 0x2a, 0x93, 0x5f, 0x62, 0x07, 0xc5, 0x5e, 0x19, 0x1e, 0xa4, 0x5b, 0x72, 0x82, 0xd2,
0x0f, 0x73, 0x09, 0xea, 0xa3, 0x12, 0x47, 0xf5, 0xd9, 0x01, 0x19, 0xee, 0x76, 0xb7, 0xd2, 0x6c,
0xa4, 0xe1, 0x4a, 0xb0, 0x2e, 0x96, 0xf5, 0xb7, 0xca, 0x17, 0x18, 0x3f, 0x88, 0xa3, 0x1a, 0x8a,
0x42, 0x09, 0xd6, 0x3b, 0xee, 0xe9, 0xa5, 0x50, 0x62, 0x36, 0x7d, 0x9d, 0x6c, 0x94, 0x93, 0xd6,
0x4e, 0x15, 0x84, 0xd5, 0x53, 0x98, 0x42, 0xb8, 0x71, 0x21, 0x9e, 0x4b, 0x58, 0xbb, 0x96, 0x65,
0x0b, 0xe3, 0x9b, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x10, 0xaa, 0xaa, 0x5e, 0x02, 0x00,
0x00,
// 439 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 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f, 0xb9, 0x9c, 0x7e, 0x1b, 0xdf, 0x5d, 0xd1, 0xaf, 0xe7,
0x97, 0xe1, 0x0b, 0x12, 0x42, 0x6f, 0x34, 0xf1, 0xa7, 0xc9, 0xcd, 0xf8, 0x47, 0x18, 0x5c, 0x0c,
0x7f, 0x9e, 0xae, 0xa4, 0x15, 0xc6, 0x0c, 0x25, 0x26, 0xfe, 0x2b, 0xc9, 0x30, 0x59, 0xd9, 0xc4,
0x95, 0x3c, 0x69, 0x8c, 0x9e, 0xb5, 0x9d, 0xfc, 0xf1, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e,
0x0f, 0xf9, 0x52, 0x14, 0x03, 0x00, 0x00,
}

Просмотреть файл

@ -3313,9 +3313,10 @@ func (m *ReplicaWasRestartedResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_ReplicaWasRestartedResponse proto.InternalMessageInfo
type StopReplicationAndGetStatusRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
StopReplicationMode replicationdata.StopReplicationMode `protobuf:"varint,1,opt,name=stop_replication_mode,json=stopReplicationMode,proto3,enum=replicationdata.StopReplicationMode" json:"stop_replication_mode,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StopReplicationAndGetStatusRequest) Reset() { *m = StopReplicationAndGetStatusRequest{} }
@ -3343,11 +3344,23 @@ func (m *StopReplicationAndGetStatusRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_StopReplicationAndGetStatusRequest proto.InternalMessageInfo
func (m *StopReplicationAndGetStatusRequest) GetStopReplicationMode() replicationdata.StopReplicationMode {
if m != nil {
return m.StopReplicationMode
}
return replicationdata.StopReplicationMode_IOANDSQLTHREAD
}
type StopReplicationAndGetStatusResponse struct {
Status *replicationdata.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
// HybridStatus is deprecated. It currently represents a hybrid struct where all data represents the before state,
// except for all position related data which comes from the after state. Please use status instead, which holds
// discrete replication status calls before and after stopping the replica, or stopping the replica's io_thread.
HybridStatus *replicationdata.Status `protobuf:"bytes,1,opt,name=hybrid_status,json=hybridStatus,proto3" json:"hybrid_status,omitempty"` // Deprecated: Do not use.
// Status represents the replication status call right before, and right after telling the replica to stop.
Status *replicationdata.StopReplicationStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StopReplicationAndGetStatusResponse) Reset() { *m = StopReplicationAndGetStatusResponse{} }
@ -3375,7 +3388,15 @@ func (m *StopReplicationAndGetStatusResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_StopReplicationAndGetStatusResponse proto.InternalMessageInfo
func (m *StopReplicationAndGetStatusResponse) GetStatus() *replicationdata.Status {
// Deprecated: Do not use.
func (m *StopReplicationAndGetStatusResponse) GetHybridStatus() *replicationdata.Status {
if m != nil {
return m.HybridStatus
}
return nil
}
func (m *StopReplicationAndGetStatusResponse) GetStatus() *replicationdata.StopReplicationStatus {
if m != nil {
return m.Status
}
@ -4390,140 +4411,144 @@ func init() {
func init() { proto.RegisterFile("tabletmanagerdata.proto", fileDescriptor_ff9ac4f89e61ffa4) }
var fileDescriptor_ff9ac4f89e61ffa4 = []byte{
// 2154 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xdd, 0x6e, 0x1b, 0xc7,
0x15, 0x06, 0xa9, 0x1f, 0x4b, 0x87, 0x3f, 0xa2, 0x56, 0x94, 0x48, 0x51, 0xb1, 0x2c, 0xaf, 0x9d,
0xc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xfc, 0x8a, 0x86,
0xd8, 0xa5, 0xa3, 0xcd, 0x5f, 0x0a, 0x50, 0x53, 0x8d, 0x3d, 0x1d, 0xe7, 0xcf, 0xe8, 0xda, 0xc1,
0xd1, 0x22, 0x9b, 0x70, 0x35, 0x92, 0x2a, 0x20, 0xa7, 0xe1, 0xab, 0x91, 0x74, 0x8a, 0x84, 0x62,
0x4f, 0xc7, 0xb4, 0x1f, 0xdb, 0x0e, 0x37, 0x60, 0x3d, 0x47, 0x95, 0xb1, 0xf3, 0xe0, 0xd3, 0xef,
0xdb, 0x03, 0x5f, 0x52, 0x21, 0xda, 0x3e, 0xdb, 0x36, 0x5f, 0xdb, 0x3d, 0xb6, 0x3d, 0x90, 0xdb,
0xfa, 0x5f, 0x7f, 0xdb, 0x53, 0xbf, 0x15, 0x74, 0xe6, 0x35, 0xe1, 0xf3, 0xff, 0x07, 0x00, 0x00,
0xff, 0xff, 0x00, 0xaf, 0x7c, 0xe6, 0x84, 0x1c, 0x00, 0x00,
// 2217 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0xdd, 0x72, 0xdb, 0xc6,
0x15, 0x1e, 0x50, 0x3f, 0x96, 0x0e, 0x7f, 0x44, 0x81, 0x94, 0x08, 0x51, 0xb1, 0x2c, 0xc3, 0x4e,
0xe2, 0x26, 0x53, 0x2a, 0x51, 0x52, 0x4f, 0x26, 0xfd, 0x99, 0xca, 0xb6, 0x64, 0x3b, 0x56, 0x62,
0x05, 0xb2, 0xe3, 0x4c, 0xa6, 0x53, 0xcc, 0x92, 0x58, 0x91, 0x18, 0x81, 0x58, 0x78, 0x77, 0x41,
0x89, 0x37, 0x7d, 0x84, 0x3e, 0x41, 0xa7, 0x37, 0x9d, 0x69, 0xef, 0xfb, 0x10, 0x7d, 0x84, 0xf4,
0x51, 0x7a, 0xd1, 0x8b, 0x76, 0xf6, 0x07, 0x24, 0x40, 0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, 0x4e, 0xf6, 0xef, 0x67, 0xea, 0x17, 0x3f, 0x8d, 0x5d,
0x3a, 0x86, 0xfd, 0xc9, 0x80, 0xba, 0xb8, 0x84, 0xd2, 0x71, 0xfe, 0x84, 0xae, 0x48, 0x3d, 0x06,
0x65, 0x13, 0x2e, 0xc6, 0x67, 0x01, 0x14, 0x5c, 0x4e, 0x62, 0x7c, 0xce, 0x91, 0xb4, 0xd8, 0xd3,
0x29, 0xed, 0x7f, 0x6d, 0xdd, 0x9b, 0xb0, 0x51, 0xa0, 0x4a, 0xd9, 0x79, 0xf0, 0xc9, 0x0f, 0x9d,
0x91, 0xcf, 0x31, 0x63, 0x1d, 0x9f, 0xec, 0xa8, 0xaf, 0x9d, 0x3e, 0xd9, 0x19, 0xf1, 0x1d, 0xf9,
0x6f, 0xca, 0x9d, 0xdc, 0xef, 0x1a, 0xdd, 0x45, 0x49, 0xf8, 0xec, 0xbf, 0x01, 0x00, 0x00, 0xff,
0xff, 0x5e, 0x9b, 0xa4, 0x4a, 0x30, 0x1d, 0x00, 0x00,
}

Просмотреть файл

@ -742,8 +742,8 @@ func (itmc *internalTabletManagerClient) SlaveWasRestarted(ctx context.Context,
return fmt.Errorf("not implemented in vtcombo")
}
func (itmc *internalTabletManagerClient) StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.Status, error) {
return nil, fmt.Errorf("not implemented in vtcombo")
func (itmc *internalTabletManagerClient) StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet, stopReplicationMode replicationdatapb.StopReplicationMode) (*replicationdatapb.Status, *replicationdatapb.StopReplicationStatus, error) {
return nil, nil, fmt.Errorf("not implemented in vtcombo")
}
func (itmc *internalTabletManagerClient) PromoteReplica(ctx context.Context, tablet *topodatapb.Tablet) (string, error) {

Просмотреть файл

@ -21,6 +21,7 @@ import (
"sort"
"testing"
"time"
"vitess.io/vitess/go/vt/callerid"
querypb "vitess.io/vitess/go/vt/proto/query"
vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc"

Просмотреть файл

@ -276,8 +276,8 @@ func (client *FakeTabletManagerClient) SetMaster(ctx context.Context, tablet *to
}
// StopReplicationAndGetStatus is part of the tmclient.TabletManagerClient interface.
func (client *FakeTabletManagerClient) StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.Status, error) {
return &replicationdatapb.Status{}, nil
func (client *FakeTabletManagerClient) StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet, stopReplicationMode replicationdatapb.StopReplicationMode) (*replicationdatapb.Status, *replicationdatapb.StopReplicationStatus, error) {
return &replicationdatapb.Status{}, &replicationdatapb.StopReplicationStatus{}, nil
}
// PromoteReplica is part of the tmclient.TabletManagerClient interface.

Просмотреть файл

@ -713,17 +713,22 @@ func (client *Client) ReplicaWasRestarted(ctx context.Context, tablet *topodatap
}
// StopReplicationAndGetStatus is part of the tmclient.TabletManagerClient interface.
func (client *Client) StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.Status, error) {
func (client *Client) StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet, stopReplicationMode replicationdatapb.StopReplicationMode) (hybridStatus *replicationdatapb.Status, status *replicationdatapb.StopReplicationStatus, err error) {
cc, c, err := client.dial(tablet)
if err != nil {
return nil, err
return nil, nil, err
}
defer cc.Close()
response, err := c.StopReplicationAndGetStatus(ctx, &tabletmanagerdatapb.StopReplicationAndGetStatusRequest{})
response, err := c.StopReplicationAndGetStatus(ctx, &tabletmanagerdatapb.StopReplicationAndGetStatusRequest{
StopReplicationMode: stopReplicationMode,
})
if err != nil {
return nil, err
return nil, nil, err
}
return response.Status, nil
return response.HybridStatus, &replicationdatapb.StopReplicationStatus{
Before: response.Status.Before,
After: response.Status.After,
}, nil
}
// PromoteReplica is part of the tmclient.TabletManagerClient interface.

Просмотреть файл

@ -401,9 +401,11 @@ func (s *server) StopReplicationAndGetStatus(ctx context.Context, request *table
defer s.tm.HandleRPCPanic(ctx, "StopReplicationAndGetStatus", request, response, true /*verbose*/, &err)
ctx = callinfo.GRPCCallInfo(ctx)
response = &tabletmanagerdatapb.StopReplicationAndGetStatusResponse{}
status, err := s.tm.StopReplicationAndGetStatus(ctx)
statusResponse, err := s.tm.StopReplicationAndGetStatus(ctx, request.StopReplicationMode)
if err == nil {
response.Status = status
response.HybridStatus = statusResponse.HybridStatus
response.Status = statusResponse.Status
}
return response, err
}

Просмотреть файл

@ -143,9 +143,9 @@ type RPCTM interface {
// Deprecated
SlaveWasRestarted(ctx context.Context, parent *topodatapb.TabletAlias) error
ReplicaWasRestarted(ctx context.Context, parent *topodatapb.TabletAlias) error
StopReplicationAndGetStatus(ctx context.Context, stopReplicationMode replicationdatapb.StopReplicationMode) (StopReplicationAndGetStatusResponse, error)
StopReplicationAndGetStatus(ctx context.Context) (*replicationdatapb.Status, error)
ReplicaWasRestarted(ctx context.Context, parent *topodatapb.TabletAlias) error
PromoteReplica(ctx context.Context) (string, error)

Просмотреть файл

@ -97,6 +97,26 @@ func (tm *TabletManager) stopReplicationLocked(ctx context.Context) error {
return tm.MysqlDaemon.StopReplication(tm.hookExtraEnv())
}
func (tm *TabletManager) stopIOThreadLocked(ctx context.Context) error {
// Remember that we were told to stop, so we don't try to
// restart ourselves (in replication_reporter).
tm.setReplicationStopped(true)
// Also tell Orchestrator we're stopped on purpose for some Vitess task.
// Do this in the background, as it's best-effort.
go func() {
if tm.orc == nil {
return
}
if err := tm.orc.BeginMaintenance(tm.Tablet(), "vttablet has been told to StopReplication"); err != nil {
log.Warningf("Orchestrator BeginMaintenance failed: %v", err)
}
}()
return tm.MysqlDaemon.StopIOThread(ctx)
}
// StopReplicationMinimum will stop the replication after it reaches at least the
// provided position. Works both when Vitess manages
// replication or not (using hook if not).
@ -602,30 +622,93 @@ func (tm *TabletManager) ReplicaWasRestarted(ctx context.Context, parent *topoda
// StopReplicationAndGetStatus stops MySQL replication, and returns the
// current status.
func (tm *TabletManager) StopReplicationAndGetStatus(ctx context.Context) (*replicationdatapb.Status, error) {
func (tm *TabletManager) StopReplicationAndGetStatus(ctx context.Context, stopReplicationMode replicationdatapb.StopReplicationMode) (StopReplicationAndGetStatusResponse, error) {
if err := tm.lock(ctx); err != nil {
return nil, err
return StopReplicationAndGetStatusResponse{}, err
}
defer tm.unlock()
// get the status before we stop replication
// Get the status before we stop replication.
// Doing this first allows us to return the status in the case that stopping replication
// returns an error, so a user can optionally inspect the status before a stop was called.
rs, err := tm.MysqlDaemon.ReplicationStatus()
if err != nil {
return nil, vterrors.Wrap(err, "before status failed")
return StopReplicationAndGetStatusResponse{}, vterrors.Wrap(err, "before status failed")
}
if !rs.IOThreadRunning && !rs.SQLThreadRunning {
// no replication is running, just return what we got
return mysql.ReplicationStatusToProto(rs), nil
before := mysql.ReplicationStatusToProto(rs)
if stopReplicationMode == replicationdatapb.StopReplicationMode_IOTHREADONLY {
if !rs.IOThreadRunning {
return StopReplicationAndGetStatusResponse{
HybridStatus: before,
Status: &replicationdatapb.StopReplicationStatus{
Before: before,
After: before,
},
}, nil
}
if err := tm.stopIOThreadLocked(ctx); err != nil {
return StopReplicationAndGetStatusResponse{
Status: &replicationdatapb.StopReplicationStatus{
Before: before,
},
}, vterrors.Wrap(err, "stop io thread failed")
}
} else {
if !rs.IOThreadRunning && !rs.SQLThreadRunning {
// no replication is running, just return what we got
return StopReplicationAndGetStatusResponse{
HybridStatus: before,
Status: &replicationdatapb.StopReplicationStatus{
Before: before,
After: before,
},
}, nil
}
if err := tm.stopReplicationLocked(ctx); err != nil {
return StopReplicationAndGetStatusResponse{
Status: &replicationdatapb.StopReplicationStatus{
Before: before,
},
}, vterrors.Wrap(err, "stop replication failed")
}
}
if err := tm.stopReplicationLocked(ctx); err != nil {
return nil, vterrors.Wrap(err, "failed to stop replication")
}
// now patch in the current position
rs.Position, err = tm.MysqlDaemon.MasterPosition()
// Get the status after we stop replication so we have up to date position and relay log positions.
rsAfter, err := tm.MysqlDaemon.ReplicationStatus()
if err != nil {
return nil, vterrors.Wrap(err, "after position failed")
return StopReplicationAndGetStatusResponse{
Status: &replicationdatapb.StopReplicationStatus{
Before: before,
},
}, vterrors.Wrap(err, "acquiring replication status failed")
}
return mysql.ReplicationStatusToProto(rs), nil
after := mysql.ReplicationStatusToProto(rsAfter)
rs.Position = rsAfter.Position
rs.RelayLogPosition = rsAfter.RelayLogPosition
rs.FilePosition = rsAfter.FilePosition
rs.FileRelayLogPosition = rsAfter.FileRelayLogPosition
return StopReplicationAndGetStatusResponse{
HybridStatus: mysql.ReplicationStatusToProto(rs),
Status: &replicationdatapb.StopReplicationStatus{
Before: before,
After: after,
},
}, nil
}
// StopReplicationAndGetStatusResponse holds the original hybrid Status struct, as well as a new Status field, which
// hold the result of show replica status called before stopping replication, and after stopping replication.
type StopReplicationAndGetStatusResponse struct {
// HybridStatus is deprecated. It currently represents a hybrid struct where all data represents the before state,
// except for all position related data which comes from the after state. Please use status instead, which holds
// discrete replication status calls before and after stopping the replica, or stopping the replica's io_thread.
HybridStatus *replicationdatapb.Status
// Status represents the replication status call right before, and right after telling the replica to stop.
Status *replicationdatapb.StopReplicationStatus
}
// PromoteReplica makes the current tablet the master

Просмотреть файл

@ -210,7 +210,7 @@ type TabletManagerClient interface {
// StopReplicationAndGetStatus stops replication and returns the
// current position.
StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet) (*replicationdatapb.Status, error)
StopReplicationAndGetStatus(ctx context.Context, tablet *topodatapb.Tablet, stopReplicationMode replicationdatapb.StopReplicationMode) (*replicationdatapb.Status, *replicationdatapb.StopReplicationStatus, error)
// PromoteReplica makes the tablet the new master
PromoteReplica(ctx context.Context, tablet *topodatapb.Tablet) (string, error)

Просмотреть файл

@ -1244,6 +1244,19 @@ func tmRPCTestSlaveWasRestartedPanic(ctx context.Context, t *testing.T, client t
expectHandleRPCPanic(t, "SlaveWasRestarted", true /*verbose*/, err)
}
func (fra *fakeRPCTM) StopReplicationAndGetStatus(ctx context.Context, stopReplicationMode replicationdatapb.StopReplicationMode) (tabletmanager.StopReplicationAndGetStatusResponse, error) {
if fra.panics {
panic(fmt.Errorf("test-triggered panic"))
}
return tabletmanager.StopReplicationAndGetStatusResponse{
HybridStatus: testReplicationStatus,
Status: &replicationdatapb.StopReplicationStatus{
Before: testReplicationStatus,
After: testReplicationStatus,
},
}, nil
}
var testReplicaWasRestartedParent = &topodatapb.TabletAlias{
Cell: "prison",
Uid: 42,
@ -1269,20 +1282,15 @@ func tmRPCTestReplicaWasRestartedPanic(ctx context.Context, t *testing.T, client
expectHandleRPCPanic(t, "ReplicaWasRestarted", true /*verbose*/, err)
}
func (fra *fakeRPCTM) StopReplicationAndGetStatus(ctx context.Context) (*replicationdatapb.Status, error) {
if fra.panics {
panic(fmt.Errorf("test-triggered panic"))
}
return testReplicationStatus, nil
}
func tmRPCTestStopReplicationAndGetStatus(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) {
rp, err := client.StopReplicationAndGetStatus(ctx, tablet)
rp, _, err := client.StopReplicationAndGetStatus(ctx, tablet, replicationdatapb.StopReplicationMode_IOANDSQLTHREAD)
compareError(t, "StopReplicationAndGetStatus", err, rp, testReplicationStatus)
rp, _, err = client.StopReplicationAndGetStatus(ctx, tablet, replicationdatapb.StopReplicationMode_IOTHREADONLY)
compareError(t, "StopReplicationAndGetStatus", err, rp, testReplicationStatus)
}
func tmRPCTestStopReplicationAndGetStatusPanic(ctx context.Context, t *testing.T, client tmclient.TabletManagerClient, tablet *topodatapb.Tablet) {
_, err := client.StopReplicationAndGetStatus(ctx, tablet)
_, _, err := client.StopReplicationAndGetStatus(ctx, tablet, replicationdatapb.StopReplicationMode_IOANDSQLTHREAD)
expectHandleRPCPanic(t, "StopReplicationAndGetStatus", true /*verbose*/, err)
}

Просмотреть файл

@ -917,7 +917,7 @@ func (wr *Wrangler) emergencyReparentShardLocked(ctx context.Context, ev *events
event.DispatchUpdate(ev, "stop replication on all replicas")
wg := sync.WaitGroup{}
mu := sync.Mutex{}
statusMap := make(map[string]*replicationdatapb.Status)
statusMap := make(map[string]*replicationdatapb.StopReplicationStatus)
for alias, tabletInfo := range tabletMap {
wg.Add(1)
go func(alias string, tabletInfo *topo.TabletInfo) {
@ -925,13 +925,14 @@ func (wr *Wrangler) emergencyReparentShardLocked(ctx context.Context, ev *events
wr.logger.Infof("getting replication position from %v", alias)
ctx, cancel := context.WithTimeout(ctx, waitReplicasTimeout)
defer cancel()
rp, err := wr.tmc.StopReplicationAndGetStatus(ctx, tabletInfo.Tablet)
// TODO: Once we refactor EmergencyReparent, change the stopReplicationOption argument to IOThreadOnly.
_, stopReplicationStatus, err := wr.tmc.StopReplicationAndGetStatus(ctx, tabletInfo.Tablet, replicationdatapb.StopReplicationMode_IOANDSQLTHREAD)
if err != nil {
wr.logger.Warningf("failed to get replication status from %v, ignoring tablet: %v", alias, err)
return
}
mu.Lock()
statusMap[alias] = rp
statusMap[alias] = stopReplicationStatus
mu.Unlock()
}(alias, tabletInfo)
}
@ -947,20 +948,22 @@ func (wr *Wrangler) emergencyReparentShardLocked(ctx context.Context, ev *events
if !ok {
return fmt.Errorf("couldn't get master elect %v replication position", topoproto.TabletAliasString(masterElectTabletAlias))
}
masterElectPos, err := mysql.DecodePosition(masterElectStatus.Position)
masterElectStrPos := masterElectStatus.After.Position
masterElectPos, err := mysql.DecodePosition(masterElectStrPos)
if err != nil {
return fmt.Errorf("cannot decode master elect position %v: %v", masterElectStatus.Position, err)
return fmt.Errorf("cannot decode master elect position %v: %v", masterElectStrPos, err)
}
for alias, status := range statusMap {
if alias == masterElectTabletAliasStr {
continue
}
pos, err := mysql.DecodePosition(status.Position)
posStr := status.After.Position
pos, err := mysql.DecodePosition(posStr)
if err != nil {
return fmt.Errorf("cannot decode replica %v position %v: %v", alias, status.Position, err)
return fmt.Errorf("cannot decode replica %v position %v: %v", alias, posStr, err)
}
if !masterElectPos.AtLeast(pos) {
return fmt.Errorf("tablet %v is more advanced than master elect tablet %v: %v > %v", alias, masterElectTabletAliasStr, status.Position, masterElectStatus.Position)
return fmt.Errorf("tablet %v is more advanced than master elect tablet %v: %v > %v", alias, masterElectTabletAliasStr, posStr, masterElectStrPos)
}
}
@ -1008,7 +1011,7 @@ func (wr *Wrangler) emergencyReparentShardLocked(ctx context.Context, ev *events
wr.logger.Infof("setting new master on replica %v", alias)
forceStart := false
if status, ok := statusMap[alias]; ok {
forceStart = status.IoThreadRunning || status.SqlThreadRunning
forceStart = replicaWasRunning(status)
}
if err := wr.tmc.SetMaster(replCtx, tabletInfo.Tablet, masterElectTabletAlias, now, "", forceStart); err != nil {
rec.RecordError(fmt.Errorf("tablet %v SetMaster failed: %v", alias, err))
@ -1085,3 +1088,7 @@ func (wr *Wrangler) TabletExternallyReparented(ctx context.Context, newMasterAli
}
return nil
}
func replicaWasRunning(stopReplicationStatus *replicationdatapb.StopReplicationStatus) bool {
return stopReplicationStatus.Before.IoThreadRunning || stopReplicationStatus.Before.SqlThreadRunning
}

Просмотреть файл

@ -38,3 +38,16 @@ message Status {
uint32 master_server_id = 11;
string master_uuid = 12;
}
// StopReplicationStatus represents the replication status before calling StopReplication, and the replication status collected immediately after
// calling StopReplication.
message StopReplicationStatus {
replicationdata.Status before = 1;
replicationdata.Status after = 2;
}
// StopReplicationMode is used to provide controls over how replication is stopped.
enum StopReplicationMode {
IOANDSQLTHREAD = 0;
IOTHREADONLY = 1;
}

Просмотреть файл

@ -404,10 +404,17 @@ message ReplicaWasRestartedResponse {
}
message StopReplicationAndGetStatusRequest {
replicationdata.StopReplicationMode stop_replication_mode = 1;
}
message StopReplicationAndGetStatusResponse {
replicationdata.Status status = 1;
// HybridStatus is deprecated. It currently represents a hybrid struct where all data represents the before state,
// except for all position related data which comes from the after state. Please use status instead, which holds
// discrete replication status calls before and after stopping the replica, or stopping the replica's io_thread.
replicationdata.Status hybrid_status = 1 [deprecated=true];
// Status represents the replication status call right before, and right after telling the replica to stop.
replicationdata.StopReplicationStatus status = 2;
}
message PromoteReplicaRequest {