diff --git a/go/vt/proto/binlogdata/binlogdata.pb.go b/go/vt/proto/binlogdata/binlogdata.pb.go index 22b36bc0c54..804e5f414e6 100644 --- a/go/vt/proto/binlogdata/binlogdata.pb.go +++ b/go/vt/proto/binlogdata/binlogdata.pb.go @@ -719,7 +719,10 @@ type BinlogSource struct { OnDdl OnDDLAction `protobuf:"varint,7,opt,name=on_ddl,json=onDdl,proto3,enum=binlogdata.OnDDLAction" json:"on_ddl,omitempty"` // Source is an external mysql. This attribute should be set to the username // to use in the connection - ExternalMysql string `protobuf:"bytes,8,opt,name=external_mysql,json=externalMysql,proto3" json:"external_mysql,omitempty"` + ExternalMysql string `protobuf:"bytes,8,opt,name=external_mysql,json=externalMysql,proto3" json:"external_mysql,omitempty"` + // stop_after_copy specifies if vreplication should be stopped + // after copying is done. + StopAfterCopy bool `protobuf:"varint,9,opt,name=stop_after_copy,json=stopAfterCopy,proto3" json:"stop_after_copy,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -806,6 +809,13 @@ func (m *BinlogSource) GetExternalMysql() string { return "" } +func (m *BinlogSource) GetStopAfterCopy() bool { + if m != nil { + return m.StopAfterCopy + } + return false +} + // RowChange represents one row change type RowChange struct { Before *query.Row `protobuf:"bytes,1,opt,name=before,proto3" json:"before,omitempty"` @@ -1703,110 +1713,112 @@ func init() { func init() { proto.RegisterFile("binlogdata.proto", fileDescriptor_5fd02bcb2e350dad) } var fileDescriptor_5fd02bcb2e350dad = []byte{ - // 1680 bytes of a gzipped FileDescriptorProto + // 1709 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0x4b, 0x73, 0x23, 0x49, - 0x11, 0x9e, 0x96, 0x5a, 0xaf, 0x6c, 0x5b, 0x6e, 0x97, 0x1f, 0x88, 0x09, 0x96, 0xf0, 0x76, 0x30, - 0x8c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 0x76, 0x34, 0x86, 0x24, 0x25, 0x13, 0xa3, 0x0d, 0xdb, 0xaf, 0xe5, 0xb1, 0x5c, 0xe0, 0xe3, 0xfd, - 0x32, 0xfe, 0x52, 0x80, 0xca, 0xab, 0x68, 0xc1, 0x12, 0x8e, 0xea, 0x50, 0xf0, 0xa6, 0x5c, 0xaf, - 0x88, 0x0b, 0xde, 0x14, 0xfd, 0x06, 0xea, 0x81, 0x77, 0x13, 0xbb, 0xac, 0x6c, 0x44, 0x07, 0x88, - 0x26, 0xfe, 0xfe, 0xba, 0x67, 0x83, 0x54, 0x82, 0xb7, 0xc1, 0x76, 0xb0, 0xbe, 0x5c, 0x2b, 0xec, - 0x62, 0xae, 0xb0, 0x9f, 0x41, 0xdd, 0x8f, 0x26, 0xae, 0xef, 0x64, 0x63, 0x55, 0x15, 0xc5, 0xc7, - 0xb9, 0x17, 0xe9, 0x6c, 0xdd, 0xc0, 0xa5, 0xf4, 0x48, 0x5c, 0xd0, 0xe7, 0xb0, 0x35, 0x77, 0x63, - 0xea, 0x4d, 0xbc, 0xb9, 0xcb, 0x3e, 0x4c, 0xca, 0x5c, 0x31, 0xe7, 0x76, 0x0e, 0x37, 0x9c, 0x13, - 0x47, 0x9f, 0x81, 0x9e, 0xf0, 0x91, 0xe1, 0x3c, 0x44, 0xf1, 0xdd, 0xcc, 0x8f, 0x1e, 0x92, 0x46, - 0x85, 0xfb, 0xbf, 0x23, 0xf8, 0x6f, 0x53, 0xb6, 0xf1, 0xef, 0x02, 0x94, 0xaf, 0x44, 0x95, 0x9d, - 0x80, 0xca, 0x31, 0x12, 0x1f, 0x1f, 0x87, 0xeb, 0x87, 0x09, 0x09, 0x0e, 0x10, 0x97, 0x41, 0x3f, - 0x80, 0x1a, 0xf5, 0x02, 0x92, 0x50, 0x37, 0x98, 0x73, 0x50, 0x8b, 0x78, 0xc5, 0xf8, 0xba, 0x5a, - 0x61, 0x5f, 0x18, 0xac, 0xb7, 0x05, 0x4c, 0x8c, 0x44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 0x08, 0x17, 0xb0, 0x5f, 0xdc, + 0xf9, 0xbf, 0x12, 0xdf, 0xcf, 0xa1, 0x82, 0x97, 0x1e, 0x41, 0xfb, 0x50, 0xf5, 0x1d, 0x3a, 0x7f, + 0x2b, 0xa3, 0x11, 0x0b, 0x16, 0xca, 0xb5, 0xeb, 0x51, 0x12, 0xf3, 0x14, 0x36, 0xb1, 0x5c, 0xe9, + 0x7f, 0x52, 0xa0, 0x76, 0xc6, 0x49, 0xf4, 0x19, 0x54, 0xe3, 0x25, 0x0b, 0x56, 0xf4, 0xba, 0x96, + 0xf7, 0x80, 0x59, 0xc6, 0xe2, 0x33, 0x1a, 0x41, 0xeb, 0xda, 0x25, 0xde, 0x82, 0xb7, 0xee, 0x38, + 0x5c, 0x88, 0xaa, 0x68, 0x75, 0x3f, 0xcd, 0x2b, 0x08, 0x9b, 0x9d, 0xb3, 0x82, 0x20, 0xde, 0x50, + 0xd4, 0x9f, 0x41, 0xab, 0x28, 0xc1, 0xda, 0xc9, 0xc0, 0xd8, 0x9e, 0x4e, 0xec, 0xf1, 0x68, 0x36, + 0xee, 0x59, 0x83, 0xe7, 0xda, 0x23, 0xde, 0x31, 0xc6, 0xcc, 0xb2, 0x8d, 0xb3, 0xb3, 0x29, 0xb6, + 0x34, 0x45, 0xff, 0x67, 0x09, 0xb6, 0x04, 0x28, 0xb3, 0x70, 0x19, 0xcf, 0x09, 0xcb, 0xe2, 0x2d, + 0x59, 0x25, 0x91, 0x33, 0x27, 0x69, 0x16, 0xd3, 0x35, 0x03, 0x24, 0x79, 0xeb, 0xc4, 0x0b, 0x19, + 0xb9, 0x58, 0xa0, 0x5f, 0x80, 0xca, 0xb3, 0x49, 0x6d, 0xba, 0x8a, 0x08, 0xcf, 0x63, 0xab, 0xbb, + 0xbf, 0x2e, 0x6c, 0x9e, 0x2b, 0x6a, 0xad, 0x22, 0x82, 0x81, 0x66, 0x74, 0xb1, 0x1b, 0x2a, 0x0f, + 0xe8, 0x86, 0x75, 0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db, + 0xcb, 0xea, 0xf5, 0x4d, 0x63, 0xa6, 0x3d, 0x62, 0xf4, 0xec, 0x79, 0x0f, 0x0f, 0x67, 0x9a, 0xd2, + 0xff, 0xfc, 0xab, 0xa7, 0x77, 0x2e, 0x25, 0x49, 0xd2, 0x71, 0xc3, 0x53, 0x41, 0x9d, 0xde, 0x84, + 0xa7, 0x77, 0xf4, 0x94, 0xff, 0x85, 0x71, 0xba, 0x9e, 0x48, 0x57, 0x35, 0xce, 0xf9, 0xd9, 0xbf, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x78, 0x33, 0x5b, 0xba, 0x1e, 0x11, 0x00, 0x00, } diff --git a/go/vt/vtgate/vindexes/consistent_lookup.go b/go/vt/vtgate/vindexes/consistent_lookup.go index a2bc94915eb..0d62dca4b7a 100644 --- a/go/vt/vtgate/vindexes/consistent_lookup.go +++ b/go/vt/vtgate/vindexes/consistent_lookup.go @@ -25,6 +25,7 @@ import ( "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/key" querypb "vitess.io/vitess/go/vt/proto/query" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" "vitess.io/vitess/go/vt/proto/vtgate" vtgatepb "vitess.io/vitess/go/vt/proto/vtgate" vtrpcpb "vitess.io/vitess/go/vt/proto/vtrpc" @@ -83,6 +84,12 @@ func (lu *ConsistentLookup) NeedsVCursor() bool { // Map can map ids to key.Destination objects. func (lu *ConsistentLookup) Map(vcursor VCursor, ids []sqltypes.Value) ([]key.Destination, error) { out := make([]key.Destination, 0, len(ids)) + if lu.writeOnly { + for range ids { + out = append(out, key.DestinationKeyRange{KeyRange: &topodatapb.KeyRange{}}) + } + return out, nil + } results, err := lu.lkp.Lookup(vcursor, ids) if err != nil { @@ -142,6 +149,13 @@ func (lu *ConsistentLookupUnique) NeedsVCursor() bool { // Map can map ids to key.Destination objects. func (lu *ConsistentLookupUnique) Map(vcursor VCursor, ids []sqltypes.Value) ([]key.Destination, error) { out := make([]key.Destination, 0, len(ids)) + if lu.writeOnly { + for range ids { + out = append(out, key.DestinationKeyRange{KeyRange: &topodatapb.KeyRange{}}) + } + return out, nil + } + results, err := lu.lkp.Lookup(vcursor, ids) if err != nil { return nil, err @@ -166,6 +180,7 @@ func (lu *ConsistentLookupUnique) Map(vcursor VCursor, ids []sqltypes.Value) ([] // Unique and a Lookup. type clCommon struct { name string + writeOnly bool lkp lookupInternal keyspace string ownerTable string @@ -180,6 +195,11 @@ type clCommon struct { // newCLCommon is commone code for the consistent lookup vindexes. func newCLCommon(name string, m map[string]string) (*clCommon, error) { lu := &clCommon{name: name} + var err error + lu.writeOnly, err = boolFromMap(m, "write_only") + if err != nil { + return nil, err + } if err := lu.lkp.Init(m, false /* autocommit */, false /* upsert */); err != nil { return nil, err @@ -211,6 +231,13 @@ func (lu *clCommon) String() string { // Verify returns true if ids maps to ksids. func (lu *clCommon) Verify(vcursor VCursor, ids []sqltypes.Value, ksids [][]byte) ([]bool, error) { + if lu.writeOnly { + out := make([]bool, len(ids)) + for i := range ids { + out[i] = true + } + return out, nil + } return lu.lkp.VerifyCustom(vcursor, ids, ksidsToValues(ksids), vtgate.CommitOrder_PRE) } diff --git a/go/vt/vtgate/vindexes/consistent_lookup_test.go b/go/vt/vtgate/vindexes/consistent_lookup_test.go index b9cd9b40046..0125c9ea06c 100644 --- a/go/vt/vtgate/vindexes/consistent_lookup_test.go +++ b/go/vt/vtgate/vindexes/consistent_lookup_test.go @@ -29,12 +29,13 @@ import ( "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/key" querypb "vitess.io/vitess/go/vt/proto/query" + topodatapb "vitess.io/vitess/go/vt/proto/topodata" vtgatepb "vitess.io/vitess/go/vt/proto/vtgate" "vitess.io/vitess/go/vt/sqlparser" ) func TestConsistentLookupInit(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", true) cols := []sqlparser.ColIdent{ sqlparser.NewColIdent("fc"), } @@ -43,10 +44,13 @@ func TestConsistentLookupInit(t *testing.T) { if err == nil || !strings.Contains(err.Error(), want) { t.Errorf("SetOwnerInfo: %v, want %v", err, want) } + if got := lookup.(*ConsistentLookup).writeOnly; !got { + t.Errorf("lookup.writeOnly: false, want true") + } } func TestConsistentLookupInfo(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) assert.Equal(t, 20, lookup.Cost()) assert.Equal(t, "consistent_lookup", lookup.String()) assert.False(t, lookup.IsUnique()) @@ -54,7 +58,7 @@ func TestConsistentLookupInfo(t *testing.T) { } func TestConsistentLookupUniqueInfo(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup_unique") + lookup := createConsistentLookup(t, "consistent_lookup_unique", false) assert.Equal(t, 10, lookup.Cost()) assert.Equal(t, "consistent_lookup_unique", lookup.String()) assert.True(t, lookup.IsUnique()) @@ -62,7 +66,7 @@ func TestConsistentLookupUniqueInfo(t *testing.T) { } func TestConsistentLookupMap(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(makeTestResult(2), nil) vc.AddResult(makeTestResult(2), nil) @@ -98,8 +102,28 @@ func TestConsistentLookupMap(t *testing.T) { } } +func TestConsistentLookupMapWriteOnly(t *testing.T) { + lookup := createConsistentLookup(t, "consistent_lookup", true) + + got, err := lookup.Map(nil, []sqltypes.Value{sqltypes.NewInt64(1), sqltypes.NewInt64(2)}) + if err != nil { + t.Error(err) + } + want := []key.Destination{ + key.DestinationKeyRange{ + KeyRange: &topodatapb.KeyRange{}, + }, + key.DestinationKeyRange{ + KeyRange: &topodatapb.KeyRange{}, + }, + } + if !reflect.DeepEqual(got, want) { + t.Errorf("Map(): %#v, want %+v", got, want) + } +} + func TestConsistentLookupUniqueMap(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup_unique") + lookup := createConsistentLookup(t, "consistent_lookup_unique", false) vc := &loggingVCursor{} vc.AddResult(makeTestResult(0), nil) vc.AddResult(makeTestResult(1), nil) @@ -129,8 +153,28 @@ func TestConsistentLookupUniqueMap(t *testing.T) { } } +func TestConsistentLookupUniqueMapWriteOnly(t *testing.T) { + lookup := createConsistentLookup(t, "consistent_lookup_unique", true) + + got, err := lookup.Map(nil, []sqltypes.Value{sqltypes.NewInt64(1), sqltypes.NewInt64(2)}) + if err != nil { + t.Error(err) + } + want := []key.Destination{ + key.DestinationKeyRange{ + KeyRange: &topodatapb.KeyRange{}, + }, + key.DestinationKeyRange{ + KeyRange: &topodatapb.KeyRange{}, + }, + } + if !reflect.DeepEqual(got, want) { + t.Errorf("Map(): %#v, want %+v", got, want) + } +} + func TestConsistentLookupMapAbsent(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(makeTestResult(0), nil) vc.AddResult(makeTestResult(0), nil) @@ -153,7 +197,7 @@ func TestConsistentLookupMapAbsent(t *testing.T) { } func TestConsistentLookupVerify(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(makeTestResult(1), nil) vc.AddResult(makeTestResult(1), nil) @@ -174,10 +218,21 @@ func TestConsistentLookupVerify(t *testing.T) { if err == nil || err.Error() != want { t.Errorf("lookup(query fail) err: %v, want %s", err, want) } + + // Test write_only. + lookup = createConsistentLookup(t, "consistent_lookup", true) + got, err := lookup.Verify(nil, []sqltypes.Value{sqltypes.NewInt64(1), sqltypes.NewInt64(2)}, [][]byte{[]byte(""), []byte("")}) + if err != nil { + t.Error(err) + } + wantBools := []bool{true, true} + if !reflect.DeepEqual(got, wantBools) { + t.Errorf("lookup.Verify(writeOnly): %v, want %v", got, wantBools) + } } func TestConsistentLookupCreateSimple(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(&sqltypes.Result{}, nil) @@ -199,7 +254,7 @@ func TestConsistentLookupCreateSimple(t *testing.T) { } func TestConsistentLookupCreateThenRecreate(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(nil, errors.New("Duplicate entry")) vc.AddResult(&sqltypes.Result{}, nil) @@ -222,7 +277,7 @@ func TestConsistentLookupCreateThenRecreate(t *testing.T) { } func TestConsistentLookupCreateThenUpdate(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(nil, errors.New("Duplicate entry")) vc.AddResult(makeTestResult(1), nil) @@ -247,7 +302,7 @@ func TestConsistentLookupCreateThenUpdate(t *testing.T) { } func TestConsistentLookupCreateThenSkipUpdate(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(nil, errors.New("Duplicate entry")) vc.AddResult(makeTestResult(1), nil) @@ -271,7 +326,7 @@ func TestConsistentLookupCreateThenSkipUpdate(t *testing.T) { } func TestConsistentLookupCreateThenDupkey(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(nil, errors.New("Duplicate entry")) vc.AddResult(makeTestResult(1), nil) @@ -297,7 +352,7 @@ func TestConsistentLookupCreateThenDupkey(t *testing.T) { } func TestConsistentLookupCreateNonDupError(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(nil, errors.New("general error")) @@ -318,7 +373,7 @@ func TestConsistentLookupCreateNonDupError(t *testing.T) { } func TestConsistentLookupCreateThenBadRows(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(nil, errors.New("Duplicate entry")) vc.AddResult(makeTestResult(2), nil) @@ -341,7 +396,7 @@ func TestConsistentLookupCreateThenBadRows(t *testing.T) { } func TestConsistentLookupDelete(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(&sqltypes.Result{}, nil) @@ -359,7 +414,7 @@ func TestConsistentLookupDelete(t *testing.T) { } func TestConsistentLookupUpdate(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(&sqltypes.Result{}, nil) vc.AddResult(&sqltypes.Result{}, nil) @@ -383,7 +438,7 @@ func TestConsistentLookupUpdate(t *testing.T) { } func TestConsistentLookupNoUpdate(t *testing.T) { - lookup := createConsistentLookup(t, "consistent_lookup") + lookup := createConsistentLookup(t, "consistent_lookup", false) vc := &loggingVCursor{} vc.AddResult(&sqltypes.Result{}, nil) vc.AddResult(&sqltypes.Result{}, nil) @@ -403,12 +458,17 @@ func TestConsistentLookupNoUpdate(t *testing.T) { vc.verifyLog(t, []string{}) } -func createConsistentLookup(t *testing.T, name string) SingleColumn { +func createConsistentLookup(t *testing.T, name string, writeOnly bool) SingleColumn { t.Helper() + write := "false" + if writeOnly { + write = "true" + } l, err := CreateVindex(name, name, map[string]string{ - "table": "t", - "from": "fromc1,fromc2", - "to": "toc", + "table": "t", + "from": "fromc1,fromc2", + "to": "toc", + "write_only": write, }) if err != nil { t.Fatal(err) diff --git a/go/vt/vttablet/tabletmanager/vreplication/vcopier_flaky_test.go b/go/vt/vttablet/tabletmanager/vreplication/vcopier_flaky_test.go index c0d2cf10326..ca02ec3b37f 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/vcopier_flaky_test.go +++ b/go/vt/vttablet/tabletmanager/vreplication/vcopier_flaky_test.go @@ -658,6 +658,73 @@ func TestPlayerCopyTablesNone(t *testing.T) { }) } +func TestPlayerCopyTablesStopAfterCopy(t *testing.T) { + defer deleteTablet(addTablet(100)) + + execStatements(t, []string{ + "create table src1(id int, val varbinary(128), primary key(id))", + "insert into src1 values(2, 'bbb'), (1, 'aaa')", + fmt.Sprintf("create table %s.dst1(id int, val varbinary(128), primary key(id))", vrepldb), + }) + defer execStatements(t, []string{ + "drop table src1", + fmt.Sprintf("drop table %s.dst1", vrepldb), + }) + env.SchemaEngine.Reload(context.Background()) + + filter := &binlogdatapb.Filter{ + Rules: []*binlogdatapb.Rule{{ + Match: "dst1", + Filter: "select * from src1", + }}, + } + + bls := &binlogdatapb.BinlogSource{ + Keyspace: env.KeyspaceName, + Shard: env.ShardName, + Filter: filter, + OnDdl: binlogdatapb.OnDDLAction_IGNORE, + StopAfterCopy: true, + } + query := binlogplayer.CreateVReplicationState("test", bls, "", binlogplayer.VReplicationInit, playerEngine.dbName) + qr, err := playerEngine.Exec(query) + if err != nil { + t.Fatal(err) + } + defer func() { + query := fmt.Sprintf("delete from _vt.vreplication where id = %d", qr.InsertID) + if _, err := playerEngine.Exec(query); err != nil { + t.Fatal(err) + } + expectDeleteQueries(t) + }() + + expectDBClientQueries(t, []string{ + "/insert into _vt.vreplication", + // Create the list of tables to copy and transition to Copying state. + "begin", + "/insert into _vt.copy_state", + "/update _vt.vreplication set state='Copying'", + "commit", + "rollback", + // The first fast-forward has no starting point. So, it just saves the current position. + "/update _vt.vreplication set pos=", + "begin", + "insert into dst1(id,val) values (1,'aaa'), (2,'bbb')", + `/update _vt.copy_state set lastpk='fields: rows: ' where vrepl_id=.*`, + "commit", + // copy of dst1 is done: delete from copy_state. + "/delete from _vt.copy_state.*dst1", + "rollback", + // All tables copied. Stop vreplication because we requested it. + "/update _vt.vreplication set state='Stopped'", + }) + expectData(t, "dst1", [][]string{ + {"1", "aaa"}, + {"2", "bbb"}, + }) +} + func TestPlayerCopyTableCancel(t *testing.T) { defer deleteTablet(addTablet(100)) diff --git a/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go b/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go index a736920c741..fec2ab7b44c 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go +++ b/go/vt/vttablet/tabletmanager/vreplication/vreplicator.go @@ -100,6 +100,9 @@ func (vr *vreplicator) Replicate(ctx context.Context) error { return err } default: + if vr.source.StopAfterCopy { + return vr.setState(binlogplayer.BlpStopped, "Stopped after copy.") + } if err := vr.setState(binlogplayer.BlpRunning, ""); err != nil { return err } diff --git a/go/vt/wrangler/materializer.go b/go/vt/wrangler/materializer.go index 346dd93a38e..10e44b3fa03 100644 --- a/go/vt/wrangler/materializer.go +++ b/go/vt/wrangler/materializer.go @@ -223,9 +223,10 @@ func (mz *materializer) generateInserts(ctx context.Context) (string, error) { for _, source := range mz.sourceShards { bls := &binlogdatapb.BinlogSource{ - Keyspace: mz.ms.SourceKeyspace, - Shard: source.ShardName(), - Filter: &binlogdatapb.Filter{}, + Keyspace: mz.ms.SourceKeyspace, + Shard: source.ShardName(), + Filter: &binlogdatapb.Filter{}, + StopAfterCopy: mz.ms.StopAfterCopy, } for _, ts := range mz.ms.TableSettings { rule := &binlogdatapb.Rule{ diff --git a/go/vt/wrangler/materializer_test.go b/go/vt/wrangler/materializer_test.go index 453d29ddf6f..611040c9433 100644 --- a/go/vt/wrangler/materializer_test.go +++ b/go/vt/wrangler/materializer_test.go @@ -518,6 +518,33 @@ func TestMaterializerRenamedColumns(t *testing.T) { env.tmc.verifyQueries(t) } +func TestMaterializerStopAfterCopy(t *testing.T) { + ms := &vtctldatapb.MaterializeSettings{ + Workflow: "workflow", + SourceKeyspace: "sourceks", + TargetKeyspace: "targetks", + StopAfterCopy: true, + TableSettings: []*vtctldatapb.TableMaterializeSettings{{ + TargetTable: "t1", + SourceExpression: "select * from t1", + CreateDdl: "t1ddl", + }, { + TargetTable: "t2", + SourceExpression: "select * from t3", + CreateDdl: "t2ddl", + }}, + } + env := newTestMaterializerEnv(t, ms, []string{"0"}, []string{"0"}) + defer env.close() + + env.tmc.expectVRQuery(200, insertPrefix+`.*stop_after_copy:true`, &sqltypes.Result{}) + env.tmc.expectVRQuery(200, mzUpdateQuery, &sqltypes.Result{}) + + err := env.wr.Materialize(context.Background(), ms) + assert.NoError(t, err) + env.tmc.verifyQueries(t) +} + func TestMaterializerNoTargetVSchema(t *testing.T) { ms := &vtctldatapb.MaterializeSettings{ Workflow: "workflow", diff --git a/proto/binlogdata.proto b/proto/binlogdata.proto index ee4903bd625..110ba8902c7 100644 --- a/proto/binlogdata.proto +++ b/proto/binlogdata.proto @@ -174,6 +174,10 @@ message BinlogSource { // Source is an external mysql. This attribute should be set to the username // to use in the connection string external_mysql = 8; + + // stop_after_copy specifies if vreplication should be stopped + // after copying is done. + bool stop_after_copy = 9; } // VEventType enumerates the event types. diff --git a/py/vtproto/binlogdata_pb2.py b/py/vtproto/binlogdata_pb2.py index 9f3cc1f3ea8..33984799c48 100644 --- a/py/vtproto/binlogdata_pb2.py +++ b/py/vtproto/binlogdata_pb2.py @@ -23,7 +23,7 @@ package='binlogdata', syntax='proto3', serialized_options=_b('Z\'vitess.io/vitess/go/vt/proto/binlogdata'), - serialized_pb=_b('\n\x10\x62inlogdata.proto\x12\nbinlogdata\x1a\x0bvtrpc.proto\x1a\x0bquery.proto\x1a\x0etopodata.proto\"7\n\x07\x43harset\x12\x0e\n\x06\x63lient\x18\x01 \x01(\x05\x12\x0c\n\x04\x63onn\x18\x02 \x01(\x05\x12\x0e\n\x06server\x18\x03 \x01(\x05\"\xb5\x03\n\x11\x42inlogTransaction\x12;\n\nstatements\x18\x01 \x03(\x0b\x32\'.binlogdata.BinlogTransaction.Statement\x12&\n\x0b\x65vent_token\x18\x04 \x01(\x0b\x32\x11.query.EventToken\x1a\xae\x02\n\tStatement\x12\x42\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x30.binlogdata.BinlogTransaction.Statement.Category\x12$\n\x07\x63harset\x18\x02 \x01(\x0b\x32\x13.binlogdata.Charset\x12\x0b\n\x03sql\x18\x03 \x01(\x0c\"\xa9\x01\n\x08\x43\x61tegory\x12\x13\n\x0f\x42L_UNRECOGNIZED\x10\x00\x12\x0c\n\x08\x42L_BEGIN\x10\x01\x12\r\n\tBL_COMMIT\x10\x02\x12\x0f\n\x0b\x42L_ROLLBACK\x10\x03\x12\x15\n\x11\x42L_DML_DEPRECATED\x10\x04\x12\n\n\x06\x42L_DDL\x10\x05\x12\n\n\x06\x42L_SET\x10\x06\x12\r\n\tBL_INSERT\x10\x07\x12\r\n\tBL_UPDATE\x10\x08\x12\r\n\tBL_DELETE\x10\tJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04\"v\n\x15StreamKeyRangeRequest\x12\x10\n\x08position\x18\x01 \x01(\t\x12%\n\tkey_range\x18\x02 \x01(\x0b\x32\x12.topodata.KeyRange\x12$\n\x07\x63harset\x18\x03 \x01(\x0b\x32\x13.binlogdata.Charset\"S\n\x16StreamKeyRangeResponse\x12\x39\n\x12\x62inlog_transaction\x18\x01 \x01(\x0b\x32\x1d.binlogdata.BinlogTransaction\"]\n\x13StreamTablesRequest\x12\x10\n\x08position\x18\x01 \x01(\t\x12\x0e\n\x06tables\x18\x02 \x03(\t\x12$\n\x07\x63harset\x18\x03 \x01(\x0b\x32\x13.binlogdata.Charset\"Q\n\x14StreamTablesResponse\x12\x39\n\x12\x62inlog_transaction\x18\x01 \x01(\x0b\x32\x1d.binlogdata.BinlogTransaction\"%\n\x04Rule\x12\r\n\x05match\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"\x9c\x01\n\x06\x46ilter\x12\x1f\n\x05rules\x18\x01 \x03(\x0b\x32\x10.binlogdata.Rule\x12\x39\n\x0e\x66ieldEventMode\x18\x02 \x01(\x0e\x32!.binlogdata.Filter.FieldEventMode\"6\n\x0e\x46ieldEventMode\x12\x13\n\x0f\x45RR_ON_MISMATCH\x10\x00\x12\x0f\n\x0b\x42\x45ST_EFFORT\x10\x01\"\xf6\x01\n\x0c\x42inlogSource\x12\x10\n\x08keyspace\x18\x01 \x01(\t\x12\r\n\x05shard\x18\x02 \x01(\t\x12)\n\x0btablet_type\x18\x03 \x01(\x0e\x32\x14.topodata.TabletType\x12%\n\tkey_range\x18\x04 \x01(\x0b\x32\x12.topodata.KeyRange\x12\x0e\n\x06tables\x18\x05 \x03(\t\x12\"\n\x06\x66ilter\x18\x06 \x01(\x0b\x32\x12.binlogdata.Filter\x12\'\n\x06on_ddl\x18\x07 \x01(\x0e\x32\x17.binlogdata.OnDDLAction\x12\x16\n\x0e\x65xternal_mysql\x18\x08 \x01(\t\"B\n\tRowChange\x12\x1a\n\x06\x62\x65\x66ore\x18\x01 \x01(\x0b\x32\n.query.Row\x12\x19\n\x05\x61\x66ter\x18\x02 \x01(\x0b\x32\n.query.Row\"J\n\x08RowEvent\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12*\n\x0brow_changes\x18\x02 \x03(\x0b\x32\x15.binlogdata.RowChange\">\n\nFieldEvent\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12\x1c\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x0c.query.Field\":\n\tShardGtid\x12\x10\n\x08keyspace\x18\x01 \x01(\t\x12\r\n\x05shard\x18\x02 \x01(\t\x12\x0c\n\x04gtid\x18\x03 \x01(\t\"3\n\x05VGtid\x12*\n\x0bshard_gtids\x18\x01 \x03(\x0b\x32\x15.binlogdata.ShardGtid\"0\n\rKeyspaceShard\x12\x10\n\x08keyspace\x18\x01 \x01(\t\x12\r\n\x05shard\x18\x02 \x01(\t\"\xe7\x01\n\x07Journal\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x31\n\x0emigration_type\x18\x02 \x01(\x0e\x32\x19.binlogdata.MigrationType\x12\x0e\n\x06tables\x18\x03 \x03(\t\x12\x16\n\x0elocal_position\x18\x04 \x01(\t\x12*\n\x0bshard_gtids\x18\x05 \x03(\x0b\x32\x15.binlogdata.ShardGtid\x12/\n\x0cparticipants\x18\x06 \x03(\x0b\x32\x19.binlogdata.KeyspaceShard\x12\x18\n\x10source_workflows\x18\x07 \x03(\t\"\x9d\x02\n\x06VEvent\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x16.binlogdata.VEventType\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\x12\x0c\n\x04gtid\x18\x03 \x01(\t\x12\x0b\n\x03\x64\x64l\x18\x04 \x01(\t\x12\'\n\trow_event\x18\x05 \x01(\x0b\x32\x14.binlogdata.RowEvent\x12+\n\x0b\x66ield_event\x18\x06 \x01(\x0b\x32\x16.binlogdata.FieldEvent\x12 \n\x05vgtid\x18\x07 \x01(\x0b\x32\x11.binlogdata.VGtid\x12$\n\x07journal\x18\x08 \x01(\x0b\x32\x13.binlogdata.Journal\x12\x0b\n\x03\x64ml\x18\t \x01(\t\x12\x14\n\x0c\x63urrent_time\x18\x14 \x01(\x03\"\xc7\x01\n\x0eVStreamRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\x10\n\x08position\x18\x04 \x01(\t\x12\"\n\x06\x66ilter\x18\x05 \x01(\x0b\x32\x12.binlogdata.Filter\"5\n\x0fVStreamResponse\x12\"\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x12.binlogdata.VEvent\"\xc8\x01\n\x12VStreamRowsRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\r\n\x05query\x18\x04 \x01(\t\x12\"\n\x06lastpk\x18\x05 \x01(\x0b\x32\x12.query.QueryResult\"\x97\x01\n\x13VStreamRowsResponse\x12\x1c\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x0c.query.Field\x12\x1e\n\x08pkfields\x18\x02 \x03(\x0b\x32\x0c.query.Field\x12\x0c\n\x04gtid\x18\x03 \x01(\t\x12\x18\n\x04rows\x18\x04 \x03(\x0b\x32\n.query.Row\x12\x1a\n\x06lastpk\x18\x05 \x01(\x0b\x32\n.query.Row\"\xa7\x01\n\x15VStreamResultsRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\r\n\x05query\x18\x04 \x01(\t\"^\n\x16VStreamResultsResponse\x12\x1c\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x0c.query.Field\x12\x0c\n\x04gtid\x18\x03 \x01(\t\x12\x18\n\x04rows\x18\x04 \x03(\x0b\x32\n.query.Row*>\n\x0bOnDDLAction\x12\n\n\x06IGNORE\x10\x00\x12\x08\n\x04STOP\x10\x01\x12\x08\n\x04\x45XEC\x10\x02\x12\x0f\n\x0b\x45XEC_IGNORE\x10\x03*\xd1\x01\n\nVEventType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04GTID\x10\x01\x12\t\n\x05\x42\x45GIN\x10\x02\x12\n\n\x06\x43OMMIT\x10\x03\x12\x0c\n\x08ROLLBACK\x10\x04\x12\x07\n\x03\x44\x44L\x10\x05\x12\n\n\x06INSERT\x10\x06\x12\x0b\n\x07REPLACE\x10\x07\x12\n\n\x06UPDATE\x10\x08\x12\n\n\x06\x44\x45LETE\x10\t\x12\x07\n\x03SET\x10\n\x12\t\n\x05OTHER\x10\x0b\x12\x07\n\x03ROW\x10\x0c\x12\t\n\x05\x46IELD\x10\r\x12\r\n\tHEARTBEAT\x10\x0e\x12\t\n\x05VGTID\x10\x0f\x12\x0b\n\x07JOURNAL\x10\x10*\'\n\rMigrationType\x12\n\n\x06TABLES\x10\x00\x12\n\n\x06SHARDS\x10\x01\x42)Z\'vitess.io/vitess/go/vt/proto/binlogdatab\x06proto3') + serialized_pb=_b('\n\x10\x62inlogdata.proto\x12\nbinlogdata\x1a\x0bvtrpc.proto\x1a\x0bquery.proto\x1a\x0etopodata.proto\"7\n\x07\x43harset\x12\x0e\n\x06\x63lient\x18\x01 \x01(\x05\x12\x0c\n\x04\x63onn\x18\x02 \x01(\x05\x12\x0e\n\x06server\x18\x03 \x01(\x05\"\xb5\x03\n\x11\x42inlogTransaction\x12;\n\nstatements\x18\x01 \x03(\x0b\x32\'.binlogdata.BinlogTransaction.Statement\x12&\n\x0b\x65vent_token\x18\x04 \x01(\x0b\x32\x11.query.EventToken\x1a\xae\x02\n\tStatement\x12\x42\n\x08\x63\x61tegory\x18\x01 \x01(\x0e\x32\x30.binlogdata.BinlogTransaction.Statement.Category\x12$\n\x07\x63harset\x18\x02 \x01(\x0b\x32\x13.binlogdata.Charset\x12\x0b\n\x03sql\x18\x03 \x01(\x0c\"\xa9\x01\n\x08\x43\x61tegory\x12\x13\n\x0f\x42L_UNRECOGNIZED\x10\x00\x12\x0c\n\x08\x42L_BEGIN\x10\x01\x12\r\n\tBL_COMMIT\x10\x02\x12\x0f\n\x0b\x42L_ROLLBACK\x10\x03\x12\x15\n\x11\x42L_DML_DEPRECATED\x10\x04\x12\n\n\x06\x42L_DDL\x10\x05\x12\n\n\x06\x42L_SET\x10\x06\x12\r\n\tBL_INSERT\x10\x07\x12\r\n\tBL_UPDATE\x10\x08\x12\r\n\tBL_DELETE\x10\tJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04\"v\n\x15StreamKeyRangeRequest\x12\x10\n\x08position\x18\x01 \x01(\t\x12%\n\tkey_range\x18\x02 \x01(\x0b\x32\x12.topodata.KeyRange\x12$\n\x07\x63harset\x18\x03 \x01(\x0b\x32\x13.binlogdata.Charset\"S\n\x16StreamKeyRangeResponse\x12\x39\n\x12\x62inlog_transaction\x18\x01 \x01(\x0b\x32\x1d.binlogdata.BinlogTransaction\"]\n\x13StreamTablesRequest\x12\x10\n\x08position\x18\x01 \x01(\t\x12\x0e\n\x06tables\x18\x02 \x03(\t\x12$\n\x07\x63harset\x18\x03 \x01(\x0b\x32\x13.binlogdata.Charset\"Q\n\x14StreamTablesResponse\x12\x39\n\x12\x62inlog_transaction\x18\x01 \x01(\x0b\x32\x1d.binlogdata.BinlogTransaction\"%\n\x04Rule\x12\r\n\x05match\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"\x9c\x01\n\x06\x46ilter\x12\x1f\n\x05rules\x18\x01 \x03(\x0b\x32\x10.binlogdata.Rule\x12\x39\n\x0e\x66ieldEventMode\x18\x02 \x01(\x0e\x32!.binlogdata.Filter.FieldEventMode\"6\n\x0e\x46ieldEventMode\x12\x13\n\x0f\x45RR_ON_MISMATCH\x10\x00\x12\x0f\n\x0b\x42\x45ST_EFFORT\x10\x01\"\x8f\x02\n\x0c\x42inlogSource\x12\x10\n\x08keyspace\x18\x01 \x01(\t\x12\r\n\x05shard\x18\x02 \x01(\t\x12)\n\x0btablet_type\x18\x03 \x01(\x0e\x32\x14.topodata.TabletType\x12%\n\tkey_range\x18\x04 \x01(\x0b\x32\x12.topodata.KeyRange\x12\x0e\n\x06tables\x18\x05 \x03(\t\x12\"\n\x06\x66ilter\x18\x06 \x01(\x0b\x32\x12.binlogdata.Filter\x12\'\n\x06on_ddl\x18\x07 \x01(\x0e\x32\x17.binlogdata.OnDDLAction\x12\x16\n\x0e\x65xternal_mysql\x18\x08 \x01(\t\x12\x17\n\x0fstop_after_copy\x18\t \x01(\x08\"B\n\tRowChange\x12\x1a\n\x06\x62\x65\x66ore\x18\x01 \x01(\x0b\x32\n.query.Row\x12\x19\n\x05\x61\x66ter\x18\x02 \x01(\x0b\x32\n.query.Row\"J\n\x08RowEvent\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12*\n\x0brow_changes\x18\x02 \x03(\x0b\x32\x15.binlogdata.RowChange\">\n\nFieldEvent\x12\x12\n\ntable_name\x18\x01 \x01(\t\x12\x1c\n\x06\x66ields\x18\x02 \x03(\x0b\x32\x0c.query.Field\":\n\tShardGtid\x12\x10\n\x08keyspace\x18\x01 \x01(\t\x12\r\n\x05shard\x18\x02 \x01(\t\x12\x0c\n\x04gtid\x18\x03 \x01(\t\"3\n\x05VGtid\x12*\n\x0bshard_gtids\x18\x01 \x03(\x0b\x32\x15.binlogdata.ShardGtid\"0\n\rKeyspaceShard\x12\x10\n\x08keyspace\x18\x01 \x01(\t\x12\r\n\x05shard\x18\x02 \x01(\t\"\xe7\x01\n\x07Journal\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x31\n\x0emigration_type\x18\x02 \x01(\x0e\x32\x19.binlogdata.MigrationType\x12\x0e\n\x06tables\x18\x03 \x03(\t\x12\x16\n\x0elocal_position\x18\x04 \x01(\t\x12*\n\x0bshard_gtids\x18\x05 \x03(\x0b\x32\x15.binlogdata.ShardGtid\x12/\n\x0cparticipants\x18\x06 \x03(\x0b\x32\x19.binlogdata.KeyspaceShard\x12\x18\n\x10source_workflows\x18\x07 \x03(\t\"\x9d\x02\n\x06VEvent\x12$\n\x04type\x18\x01 \x01(\x0e\x32\x16.binlogdata.VEventType\x12\x11\n\ttimestamp\x18\x02 \x01(\x03\x12\x0c\n\x04gtid\x18\x03 \x01(\t\x12\x0b\n\x03\x64\x64l\x18\x04 \x01(\t\x12\'\n\trow_event\x18\x05 \x01(\x0b\x32\x14.binlogdata.RowEvent\x12+\n\x0b\x66ield_event\x18\x06 \x01(\x0b\x32\x16.binlogdata.FieldEvent\x12 \n\x05vgtid\x18\x07 \x01(\x0b\x32\x11.binlogdata.VGtid\x12$\n\x07journal\x18\x08 \x01(\x0b\x32\x13.binlogdata.Journal\x12\x0b\n\x03\x64ml\x18\t \x01(\t\x12\x14\n\x0c\x63urrent_time\x18\x14 \x01(\x03\"\xc7\x01\n\x0eVStreamRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\x10\n\x08position\x18\x04 \x01(\t\x12\"\n\x06\x66ilter\x18\x05 \x01(\x0b\x32\x12.binlogdata.Filter\"5\n\x0fVStreamResponse\x12\"\n\x06\x65vents\x18\x01 \x03(\x0b\x32\x12.binlogdata.VEvent\"\xc8\x01\n\x12VStreamRowsRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\r\n\x05query\x18\x04 \x01(\t\x12\"\n\x06lastpk\x18\x05 \x01(\x0b\x32\x12.query.QueryResult\"\x97\x01\n\x13VStreamRowsResponse\x12\x1c\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x0c.query.Field\x12\x1e\n\x08pkfields\x18\x02 \x03(\x0b\x32\x0c.query.Field\x12\x0c\n\x04gtid\x18\x03 \x01(\t\x12\x18\n\x04rows\x18\x04 \x03(\x0b\x32\n.query.Row\x12\x1a\n\x06lastpk\x18\x05 \x01(\x0b\x32\n.query.Row\"\xa7\x01\n\x15VStreamResultsRequest\x12,\n\x13\x65\x66\x66\x65\x63tive_caller_id\x18\x01 \x01(\x0b\x32\x0f.vtrpc.CallerID\x12\x32\n\x13immediate_caller_id\x18\x02 \x01(\x0b\x32\x15.query.VTGateCallerID\x12\x1d\n\x06target\x18\x03 \x01(\x0b\x32\r.query.Target\x12\r\n\x05query\x18\x04 \x01(\t\"^\n\x16VStreamResultsResponse\x12\x1c\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x0c.query.Field\x12\x0c\n\x04gtid\x18\x03 \x01(\t\x12\x18\n\x04rows\x18\x04 \x03(\x0b\x32\n.query.Row*>\n\x0bOnDDLAction\x12\n\n\x06IGNORE\x10\x00\x12\x08\n\x04STOP\x10\x01\x12\x08\n\x04\x45XEC\x10\x02\x12\x0f\n\x0b\x45XEC_IGNORE\x10\x03*\xd1\x01\n\nVEventType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04GTID\x10\x01\x12\t\n\x05\x42\x45GIN\x10\x02\x12\n\n\x06\x43OMMIT\x10\x03\x12\x0c\n\x08ROLLBACK\x10\x04\x12\x07\n\x03\x44\x44L\x10\x05\x12\n\n\x06INSERT\x10\x06\x12\x0b\n\x07REPLACE\x10\x07\x12\n\n\x06UPDATE\x10\x08\x12\n\n\x06\x44\x45LETE\x10\t\x12\x07\n\x03SET\x10\n\x12\t\n\x05OTHER\x10\x0b\x12\x07\n\x03ROW\x10\x0c\x12\t\n\x05\x46IELD\x10\r\x12\r\n\tHEARTBEAT\x10\x0e\x12\t\n\x05VGTID\x10\x0f\x12\x0b\n\x07JOURNAL\x10\x10*\'\n\rMigrationType\x12\n\n\x06TABLES\x10\x00\x12\n\n\x06SHARDS\x10\x01\x42)Z\'vitess.io/vitess/go/vt/proto/binlogdatab\x06proto3') , dependencies=[vtrpc__pb2.DESCRIPTOR,query__pb2.DESCRIPTOR,topodata__pb2.DESCRIPTOR,]) @@ -52,8 +52,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3174, - serialized_end=3236, + serialized_start=3199, + serialized_end=3261, ) _sym_db.RegisterEnumDescriptor(_ONDDLACTION) @@ -135,8 +135,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3239, - serialized_end=3448, + serialized_start=3264, + serialized_end=3473, ) _sym_db.RegisterEnumDescriptor(_VEVENTTYPE) @@ -158,8 +158,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=3450, - serialized_end=3489, + serialized_start=3475, + serialized_end=3514, ) _sym_db.RegisterEnumDescriptor(_MIGRATIONTYPE) @@ -686,6 +686,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='stop_after_copy', full_name='binlogdata.BinlogSource.stop_after_copy', index=8, + number=9, type=8, cpp_type=7, label=1, + has_default_value=False, default_value=False, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -699,7 +706,7 @@ oneofs=[ ], serialized_start=1153, - serialized_end=1399, + serialized_end=1424, ) @@ -736,8 +743,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1401, - serialized_end=1467, + serialized_start=1426, + serialized_end=1492, ) @@ -774,8 +781,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1469, - serialized_end=1543, + serialized_start=1494, + serialized_end=1568, ) @@ -812,8 +819,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1545, - serialized_end=1607, + serialized_start=1570, + serialized_end=1632, ) @@ -857,8 +864,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1609, - serialized_end=1667, + serialized_start=1634, + serialized_end=1692, ) @@ -888,8 +895,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1669, - serialized_end=1720, + serialized_start=1694, + serialized_end=1745, ) @@ -926,8 +933,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1722, - serialized_end=1770, + serialized_start=1747, + serialized_end=1795, ) @@ -999,8 +1006,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1773, - serialized_end=2004, + serialized_start=1798, + serialized_end=2029, ) @@ -1093,8 +1100,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2007, - serialized_end=2292, + serialized_start=2032, + serialized_end=2317, ) @@ -1152,8 +1159,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2295, - serialized_end=2494, + serialized_start=2320, + serialized_end=2519, ) @@ -1183,8 +1190,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2496, - serialized_end=2549, + serialized_start=2521, + serialized_end=2574, ) @@ -1242,8 +1249,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2552, - serialized_end=2752, + serialized_start=2577, + serialized_end=2777, ) @@ -1301,8 +1308,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2755, - serialized_end=2906, + serialized_start=2780, + serialized_end=2931, ) @@ -1353,8 +1360,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2909, - serialized_end=3076, + serialized_start=2934, + serialized_end=3101, ) @@ -1398,8 +1405,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3078, - serialized_end=3172, + serialized_start=3103, + serialized_end=3197, ) _BINLOGTRANSACTION_STATEMENT.fields_by_name['category'].enum_type = _BINLOGTRANSACTION_STATEMENT_CATEGORY