From 45240dbbd77da5e0523efb6caf35e0a8d052bbc9 Mon Sep 17 00:00:00 2001 From: hongyunyan <649330952@qq.com> Date: Wed, 9 Oct 2024 10:30:17 +0800 Subject: [PATCH] dispatcher: Support UpdateSchemas for Rename Table and Rename Tables (#352) --- downstreamadapter/dispatcher/dispatcher.go | 49 +- downstreamadapter/dispatcher/helper.go | 56 ++- .../event_dispatcher_manager.go | 53 +- heartbeatpb/heartbeat.pb.go | 471 ++++++++++++++---- heartbeatpb/heartbeat.proto | 7 + pkg/common/event.go | 19 + 6 files changed, 501 insertions(+), 154 deletions(-) diff --git a/downstreamadapter/dispatcher/dispatcher.go b/downstreamadapter/dispatcher/dispatcher.go index 6d9718012..6bfee87f7 100644 --- a/downstreamadapter/dispatcher/dispatcher.go +++ b/downstreamadapter/dispatcher/dispatcher.go @@ -84,13 +84,14 @@ type Dispatcher struct { resendTask *ResendTask checkTableProgressEmptyTask *CheckProgressEmptyTask - schemaID int64 + schemaIDToDispatchers *SchemaIDToDispatchers + schemaID int64 // only exist when the dispatcher is a table trigger event dispatcher tableNameStore *TableNameStore } -func NewDispatcher(id common.DispatcherID, tableSpan *heartbeatpb.TableSpan, sink tisink.Sink, startTs uint64, statusesChan chan *heartbeatpb.TableSpanStatus, filter filter.Filter, schemaID int64) *Dispatcher { +func NewDispatcher(id common.DispatcherID, tableSpan *heartbeatpb.TableSpan, sink tisink.Sink, startTs uint64, statusesChan chan *heartbeatpb.TableSpanStatus, filter filter.Filter, schemaID int64, schemaIDToDispatchers *SchemaIDToDispatchers) *Dispatcher { dispatcher := &Dispatcher{ id: id, tableSpan: tableSpan, @@ -98,13 +99,14 @@ func NewDispatcher(id common.DispatcherID, tableSpan *heartbeatpb.TableSpan, sin statusesChan: statusesChan, //SyncPointInfo: syncPointInfo, //MemoryUsage: NewMemoryUsage(), - componentStatus: newComponentStateWithMutex(heartbeatpb.ComponentState_Working), - resolvedTs: newTsWithMutex(startTs), - filter: filter, - isRemoving: atomic.Bool{}, - ddlPendingEvent: nil, - tableProgress: types.NewTableProgress(), - schemaID: schemaID, + componentStatus: newComponentStateWithMutex(heartbeatpb.ComponentState_Working), + resolvedTs: newTsWithMutex(startTs), + filter: filter, + isRemoving: atomic.Bool{}, + ddlPendingEvent: nil, + tableProgress: types.NewTableProgress(), + schemaID: schemaID, + schemaIDToDispatchers: schemaIDToDispatchers, } // only when is not mysql sink, table trigger event dispatcher need tableNameStore to store the table name @@ -249,11 +251,36 @@ func (d *Dispatcher) DealWithDDLWhenProgressEmpty() { BlockTables: d.ddlPendingEvent.GetBlockedTables().ToPB(), NeedDroppedTables: d.ddlPendingEvent.GetNeedDroppedTables().ToPB(), NeedAddedTables: common.ToTablesPB(d.ddlPendingEvent.GetNeedAddedTables()), + UpdatedSchemas: common.ToSchemaIDChangePB(d.ddlPendingEvent.GetUpdatedSchemas()), // only exists for rename table and rename tables }, } d.SetResendTask(newResendTask(message, d)) d.statusesChan <- message } + + // dealing with events which update schema ids + // Only rename table and rename tables may update schema ids(rename db1.table1 to db2.table2) + // Here we directly update schema id of dispatcher when we begin to handle the ddl event, + // but not waiting maintainer response for ready to write/pass the ddl event. + // Because the schemaID of each dispatcher is only use to dealing with the db-level ddl event(like drop db) or drop table. + // Both the rename table/rename tables, drop table and db-level ddl event will be send to the table trigger event dispatcher in order. + // So there won't be a related db-level ddl event is in dealing when we get update schema id events. + // Thus, whether to update schema id before or after current ddl event is not important. + // To make it easier, we choose to directly update schema id here. + if d.ddlPendingEvent.GetUpdatedSchemas() != nil && d.tableSpan != heartbeatpb.DDLSpan { + for _, schemaIDChange := range d.ddlPendingEvent.GetUpdatedSchemas() { + if schemaIDChange.TableID == d.tableSpan.TableID { + if schemaIDChange.OldSchemaID != d.schemaID { + log.Error("Wrong Schema ID", zap.Any("dispatcherID", d.id), zap.Any("except schemaID", schemaIDChange.OldSchemaID), zap.Any("actual schemaID", d.schemaID), zap.Any("tableSpan", d.tableSpan.String())) + return + } else { + d.schemaID = schemaIDChange.NewSchemaID + d.schemaIDToDispatchers.Update(schemaIDChange.OldSchemaID, schemaIDChange.NewSchemaID) + return + } + } + } + } } func (d *Dispatcher) GetTableSpan() *heartbeatpb.TableSpan { @@ -306,10 +333,6 @@ func (d *Dispatcher) GetSchemaID() int64 { // return d.syncPointInfo // } -// func (d *Dispatcher) GetMemoryUsage() *MemoryUsage { -// return d.MemoryUsage -// } - func (d *Dispatcher) Remove() { // TODO: 修改这个 dispatcher 的 status 为 removing log.Info("table event dispatcher component status changed to stopping", zap.String("table", d.tableSpan.String())) diff --git a/downstreamadapter/dispatcher/helper.go b/downstreamadapter/dispatcher/helper.go index afc8f2291..fba0e0841 100644 --- a/downstreamadapter/dispatcher/helper.go +++ b/downstreamadapter/dispatcher/helper.go @@ -21,8 +21,62 @@ import ( "github.com/flowbehappy/tigate/pkg/common" "github.com/flowbehappy/tigate/utils/dynstream" "github.com/flowbehappy/tigate/utils/threadpool" + "github.com/pingcap/log" + "go.uber.org/zap" ) +type SchemaIDToDispatchers struct { + mutex sync.RWMutex + m map[int64]map[common.DispatcherID]interface{} +} + +func NewSchemaIDToDispatchers() *SchemaIDToDispatchers { + return &SchemaIDToDispatchers{ + m: make(map[int64]map[common.DispatcherID]interface{}), + } +} + +func (s *SchemaIDToDispatchers) Set(schemaID int64, dispatcherID common.DispatcherID) { + s.mutex.Lock() + defer s.mutex.Unlock() + if _, ok := s.m[schemaID]; !ok { + s.m[schemaID] = make(map[common.DispatcherID]interface{}) + } + s.m[schemaID][dispatcherID] = struct{}{} +} + +func (s *SchemaIDToDispatchers) Delete(schemaID int64, dispatcherID common.DispatcherID) { + s.mutex.Lock() + defer s.mutex.Unlock() + if _, ok := s.m[schemaID]; ok { + delete(s.m[schemaID], dispatcherID) + } +} + +func (s *SchemaIDToDispatchers) Update(oldSchemaID int64, newSchemaID int64) { + s.mutex.Lock() + defer s.mutex.Unlock() + if _, ok := s.m[oldSchemaID]; ok { + s.m[newSchemaID] = s.m[oldSchemaID] + delete(s.m, oldSchemaID) + } else { + log.Error("schemaID not found", zap.Any("schemaID", oldSchemaID)) + } +} + +func (s *SchemaIDToDispatchers) GetDispatcherIDs(schemaID int64) []common.DispatcherID { + s.mutex.RLock() + defer s.mutex.RUnlock() + if ids, ok := s.m[schemaID]; ok { + dispatcherIDs := make([]common.DispatcherID, 0, len(ids)) + for id := range ids { + dispatcherIDs = append(dispatcherIDs, id) + } + return dispatcherIDs + } + return nil +} + type SyncPointInfo struct { EnableSyncPoint bool SyncPointInterval time.Duration @@ -179,7 +233,7 @@ func newResendTask(message *heartbeatpb.TableSpanStatus, dispatcher *Dispatcher) func (t *ResendTask) Execute() time.Time { t.dispatcher.GetStatusesChan() <- t.message - return time.Now().Add(50 * time.Millisecond) + return time.Now().Add(200 * time.Millisecond) } func (t *ResendTask) Cancel() { diff --git a/downstreamadapter/dispatchermanager/event_dispatcher_manager.go b/downstreamadapter/dispatchermanager/event_dispatcher_manager.go index 2aab9b15d..269a176c4 100644 --- a/downstreamadapter/dispatchermanager/event_dispatcher_manager.go +++ b/downstreamadapter/dispatchermanager/event_dispatcher_manager.go @@ -75,7 +75,7 @@ type EventDispatcherManager struct { heartBeatTask *HeartBeatTask - schemaIDToDispatchers *SchemaIDToDispatchers + schemaIDToDispatchers *dispatcher.SchemaIDToDispatchers tableTriggerEventDispatcher *dispatcher.Dispatcher @@ -99,7 +99,7 @@ func NewEventDispatcherManager(changefeedID model.ChangeFeedID, statusesChan: make(chan *heartbeatpb.TableSpanStatus, 10000), cancel: cancel, config: cfConfig, - schemaIDToDispatchers: newSchemaIDToDispatchers(), + schemaIDToDispatchers: dispatcher.NewSchemaIDToDispatchers(), tableEventDispatcherCount: metrics.TableEventDispatcherGauge.WithLabelValues(changefeedID.Namespace, changefeedID.ID), metricCreateDispatcherDuration: metrics.CreateDispatcherDuration.WithLabelValues(changefeedID.Namespace, changefeedID.ID), metricCheckpointTs: metrics.EventDispatcherManagerCheckpointTsGauge.WithLabelValues(changefeedID.Namespace, changefeedID.ID), @@ -205,7 +205,7 @@ func (e *EventDispatcherManager) NewDispatcher(id common.DispatcherID, tableSpan return nil } - dispatcher := dispatcher.NewDispatcher(id, tableSpan, e.sink, startTs, e.statusesChan, e.filter, schemaID) + dispatcher := dispatcher.NewDispatcher(id, tableSpan, e.sink, startTs, e.statusesChan, e.filter, schemaID, e.schemaIDToDispatchers) if tableSpan.Equal(heartbeatpb.DDLSpan) { e.tableTriggerEventDispatcher = dispatcher @@ -397,10 +397,6 @@ func (e *EventDispatcherManager) GetDispatcherMap() *DispatcherMap { return e.dispatcherMap } -func (e *EventDispatcherManager) GetSchemaIDToDispatchers() *SchemaIDToDispatchers { - return e.schemaIDToDispatchers -} - func (e *EventDispatcherManager) GetMaintainerID() node.ID { return e.maintainerID } @@ -427,7 +423,7 @@ func (e *EventDispatcherManager) SetMaintainerID(maintainerID node.ID) { // Get all dispatchers id of the specified schemaID. Including the tableTriggerEventDispatcherID if exists. func (e *EventDispatcherManager) GetAllDispatchers(schemaID int64) []common.DispatcherID { - dispatcherIDs := e.GetSchemaIDToDispatchers().GetDispatcherIDs(schemaID) + dispatcherIDs := e.schemaIDToDispatchers.GetDispatcherIDs(schemaID) if e.tableTriggerEventDispatcher != nil { dispatcherIDs = append(dispatcherIDs, e.tableTriggerEventDispatcher.GetId()) } @@ -475,44 +471,3 @@ func (d *DispatcherMap) ForEach(fn func(id common.DispatcherID, dispatcher *disp return true }) } - -type SchemaIDToDispatchers struct { - mutex sync.RWMutex - m map[int64]map[common.DispatcherID]interface{} -} - -func newSchemaIDToDispatchers() *SchemaIDToDispatchers { - return &SchemaIDToDispatchers{ - m: make(map[int64]map[common.DispatcherID]interface{}), - } -} - -func (s *SchemaIDToDispatchers) Set(schemaID int64, dispatcherID common.DispatcherID) { - s.mutex.Lock() - defer s.mutex.Unlock() - if _, ok := s.m[schemaID]; !ok { - s.m[schemaID] = make(map[common.DispatcherID]interface{}) - } - s.m[schemaID][dispatcherID] = struct{}{} -} - -func (s *SchemaIDToDispatchers) Delete(schemaID int64, dispatcherID common.DispatcherID) { - s.mutex.Lock() - defer s.mutex.Unlock() - if _, ok := s.m[schemaID]; ok { - delete(s.m[schemaID], dispatcherID) - } -} - -func (s *SchemaIDToDispatchers) GetDispatcherIDs(schemaID int64) []common.DispatcherID { - s.mutex.RLock() - defer s.mutex.RUnlock() - if ids, ok := s.m[schemaID]; ok { - dispatcherIDs := make([]common.DispatcherID, 0, len(ids)) - for id := range ids { - dispatcherIDs = append(dispatcherIDs, id) - } - return dispatcherIDs - } - return nil -} diff --git a/heartbeatpb/heartbeat.pb.go b/heartbeatpb/heartbeat.pb.go index d41ee5c23..ef4f2c172 100644 --- a/heartbeatpb/heartbeat.pb.go +++ b/heartbeatpb/heartbeat.pb.go @@ -1512,19 +1512,80 @@ func (m *Table) GetSchemaID() int64 { return 0 } +type SchemaIDChange struct { + TableID int64 `protobuf:"varint,1,opt,name=TableID,proto3" json:"TableID,omitempty"` + OldSchemaID int64 `protobuf:"varint,2,opt,name=OldSchemaID,proto3" json:"OldSchemaID,omitempty"` + NewSchemaID int64 `protobuf:"varint,3,opt,name=NewSchemaID,proto3" json:"NewSchemaID,omitempty"` +} + +func (m *SchemaIDChange) Reset() { *m = SchemaIDChange{} } +func (m *SchemaIDChange) String() string { return proto.CompactTextString(m) } +func (*SchemaIDChange) ProtoMessage() {} +func (*SchemaIDChange) Descriptor() ([]byte, []int) { + return fileDescriptor_6d584080fdadb670, []int{24} +} +func (m *SchemaIDChange) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SchemaIDChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SchemaIDChange.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SchemaIDChange) XXX_Merge(src proto.Message) { + xxx_messageInfo_SchemaIDChange.Merge(m, src) +} +func (m *SchemaIDChange) XXX_Size() int { + return m.Size() +} +func (m *SchemaIDChange) XXX_DiscardUnknown() { + xxx_messageInfo_SchemaIDChange.DiscardUnknown(m) +} + +var xxx_messageInfo_SchemaIDChange proto.InternalMessageInfo + +func (m *SchemaIDChange) GetTableID() int64 { + if m != nil { + return m.TableID + } + return 0 +} + +func (m *SchemaIDChange) GetOldSchemaID() int64 { + if m != nil { + return m.OldSchemaID + } + return 0 +} + +func (m *SchemaIDChange) GetNewSchemaID() int64 { + if m != nil { + return m.NewSchemaID + } + return 0 +} + type State struct { IsBlocked bool `protobuf:"varint,1,opt,name=IsBlocked,proto3" json:"IsBlocked,omitempty"` BlockTs uint64 `protobuf:"varint,2,opt,name=BlockTs,proto3" json:"BlockTs,omitempty"` BlockTables *InfluencedTables `protobuf:"bytes,3,opt,name=BlockTables,proto3" json:"BlockTables,omitempty"` NeedDroppedTables *InfluencedTables `protobuf:"bytes,4,opt,name=NeedDroppedTables,proto3" json:"NeedDroppedTables,omitempty"` NeedAddedTables []*Table `protobuf:"bytes,5,rep,name=NeedAddedTables,proto3" json:"NeedAddedTables,omitempty"` + UpdatedSchemas []*SchemaIDChange `protobuf:"bytes,6,rep,name=UpdatedSchemas,proto3" json:"UpdatedSchemas,omitempty"` } func (m *State) Reset() { *m = State{} } func (m *State) String() string { return proto.CompactTextString(m) } func (*State) ProtoMessage() {} func (*State) Descriptor() ([]byte, []int) { - return fileDescriptor_6d584080fdadb670, []int{24} + return fileDescriptor_6d584080fdadb670, []int{25} } func (m *State) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1588,6 +1649,13 @@ func (m *State) GetNeedAddedTables() []*Table { return nil } +func (m *State) GetUpdatedSchemas() []*SchemaIDChange { + if m != nil { + return m.UpdatedSchemas + } + return nil +} + type TableSpanStatus struct { ID *DispatcherID `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` ComponentStatus ComponentState `protobuf:"varint,2,opt,name=component_status,json=componentStatus,proto3,enum=heartbeatpb.ComponentState" json:"component_status,omitempty"` @@ -1599,7 +1667,7 @@ func (m *TableSpanStatus) Reset() { *m = TableSpanStatus{} } func (m *TableSpanStatus) String() string { return proto.CompactTextString(m) } func (*TableSpanStatus) ProtoMessage() {} func (*TableSpanStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6d584080fdadb670, []int{25} + return fileDescriptor_6d584080fdadb670, []int{26} } func (m *TableSpanStatus) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1667,7 +1735,7 @@ func (m *RunningError) Reset() { *m = RunningError{} } func (m *RunningError) String() string { return proto.CompactTextString(m) } func (*RunningError) ProtoMessage() {} func (*RunningError) Descriptor() ([]byte, []int) { - return fileDescriptor_6d584080fdadb670, []int{26} + return fileDescriptor_6d584080fdadb670, []int{27} } func (m *RunningError) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1733,7 +1801,7 @@ func (m *DispatcherID) Reset() { *m = DispatcherID{} } func (m *DispatcherID) String() string { return proto.CompactTextString(m) } func (*DispatcherID) ProtoMessage() {} func (*DispatcherID) Descriptor() ([]byte, []int) { - return fileDescriptor_6d584080fdadb670, []int{27} + return fileDescriptor_6d584080fdadb670, []int{28} } func (m *DispatcherID) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1805,6 +1873,7 @@ func init() { proto.RegisterType((*MaintainerCloseResponse)(nil), "heartbeatpb.MaintainerCloseResponse") proto.RegisterType((*InfluencedTables)(nil), "heartbeatpb.InfluencedTables") proto.RegisterType((*Table)(nil), "heartbeatpb.Table") + proto.RegisterType((*SchemaIDChange)(nil), "heartbeatpb.SchemaIDChange") proto.RegisterType((*State)(nil), "heartbeatpb.State") proto.RegisterType((*TableSpanStatus)(nil), "heartbeatpb.TableSpanStatus") proto.RegisterType((*RunningError)(nil), "heartbeatpb.RunningError") @@ -1814,93 +1883,96 @@ func init() { func init() { proto.RegisterFile("heartbeatpb/heartbeat.proto", fileDescriptor_6d584080fdadb670) } var fileDescriptor_6d584080fdadb670 = []byte{ - // 1367 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xdd, 0x6e, 0x1b, 0xc5, - 0x17, 0xcf, 0xee, 0xc6, 0x8e, 0x7d, 0x9c, 0x3a, 0xdb, 0xc9, 0xbf, 0xa9, 0x9b, 0x34, 0xfe, 0x87, - 0xe5, 0xc6, 0x4d, 0x51, 0x22, 0xdc, 0x56, 0x80, 0xd4, 0xaa, 0x24, 0x4e, 0x51, 0xa3, 0xa8, 0xa5, - 0x9a, 0x04, 0x85, 0x82, 0x50, 0x35, 0xde, 0x9d, 0xd8, 0xab, 0xd8, 0x3b, 0xcb, 0xce, 0xb8, 0x69, - 0x2f, 0xb8, 0x42, 0xe2, 0x06, 0x24, 0x78, 0x16, 0xb8, 0xe4, 0x01, 0xe0, 0xb2, 0x12, 0x37, 0x5c, - 0xa2, 0xf6, 0x15, 0x78, 0x00, 0x34, 0xb3, 0xbb, 0xde, 0x0f, 0x6f, 0x3e, 0x4c, 0xb9, 0x9b, 0x33, - 0xf3, 0x3b, 0xf3, 0x71, 0xce, 0xef, 0x7c, 0xec, 0xc2, 0x4a, 0x9f, 0x92, 0x40, 0x74, 0x29, 0x11, - 0x7e, 0x77, 0x73, 0x3c, 0xde, 0xf0, 0x03, 0x26, 0x18, 0xaa, 0xa5, 0x16, 0xad, 0xa7, 0x50, 0x3d, - 0x20, 0xdd, 0x01, 0xdd, 0xf7, 0x89, 0x87, 0x1a, 0x30, 0xa7, 0x84, 0xdd, 0x9d, 0x86, 0xb6, 0xa6, - 0xb5, 0x0c, 0x1c, 0x8b, 0x68, 0x19, 0x2a, 0xfb, 0x82, 0x04, 0x62, 0x8f, 0xbe, 0x6c, 0xe8, 0x6b, - 0x5a, 0x6b, 0x1e, 0x8f, 0x65, 0xb4, 0x04, 0xe5, 0x07, 0x9e, 0x23, 0x57, 0x0c, 0xb5, 0x12, 0x49, - 0xd6, 0xcf, 0x3a, 0x98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33, 0x13, 0x98, 0x1e, 0xb5, 0x90, 0x71, 0xda, 0xd2, 0x73, 0xb5, 0x36, 0xce, 0xab, 0xc6, 0x05, - 0xf2, 0xea, 0x27, 0x60, 0xda, 0x71, 0x80, 0x3d, 0xe3, 0x49, 0xbb, 0x76, 0x4e, 0x14, 0x2e, 0xd8, - 0x69, 0x79, 0xc4, 0x27, 0x0d, 0x5e, 0x2a, 0x30, 0xf8, 0x5d, 0x58, 0x4a, 0x0c, 0xde, 0x19, 0x30, - 0x4e, 0xa7, 0xf0, 0xb5, 0x75, 0x08, 0x57, 0x27, 0xb4, 0xa7, 0x70, 0x95, 0xac, 0x20, 0x23, 0xdb, - 0xa6, 0x9c, 0xc7, 0x34, 0x8c, 0x44, 0xeb, 0x07, 0x0d, 0xcc, 0xa4, 0x21, 0x50, 0x16, 0xfa, 0x2f, - 0xfa, 0xa9, 0x65, 0xa8, 0x44, 0x0d, 0x7f, 0x48, 0x0f, 0x03, 0x8f, 0xe5, 0xb3, 0x5a, 0x25, 0xeb, - 0x1e, 0x94, 0x14, 0xee, 0x9c, 0x0f, 0x88, 0x53, 0xbc, 0x6f, 0x7d, 0xaf, 0x43, 0x29, 0x4c, 0xab, - 0xd7, 0xa1, 0xba, 0xcb, 0xb7, 0x07, 0xcc, 0x3e, 0xa6, 0x61, 0x3c, 0x56, 0x70, 0x32, 0x21, 0x77, - 0x57, 0xc3, 0xa4, 0xa2, 0x46, 0x22, 0xba, 0x0f, 0xb5, 0x70, 0xa8, 0x2c, 0x11, 0xd1, 0x68, 0xf5, - 0x94, 0xfe, 0x29, 0x04, 0xe1, 0xb4, 0x06, 0xda, 0x83, 0xcb, 0x8f, 0x29, 0x75, 0x76, 0x02, 0xe6, - 0xfb, 0x31, 0x22, 0x6a, 0xf5, 0xce, 0xd9, 0x66, 0x52, 0x0f, 0xdd, 0x85, 0x05, 0x39, 0xb9, 0xe5, - 0x38, 0xe3, 0xad, 0xc2, 0x64, 0x8e, 0x26, 0x89, 0x8d,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 0x70, 0xec, 0x7a, 0x3d, 0x53, 0x97, 0xc2, 0xbe, 0x50, 0x7c, 0x33, 0x8d, 0xed, 0xce, 0xef, 0xaf, - 0x9b, 0xda, 0xab, 0xd7, 0x4d, 0xed, 0xaf, 0xd7, 0x4d, 0xed, 0xa7, 0x37, 0xcd, 0x99, 0x57, 0x6f, - 0x9a, 0x33, 0x7f, 0xbe, 0x69, 0xce, 0x7c, 0x71, 0xa3, 0xe7, 0x8a, 0xfe, 0xa8, 0xbb, 0x61, 0xb3, - 0xe1, 0xe6, 0xd1, 0x80, 0x9d, 0x74, 0x69, 0x9f, 0xf8, 0xfe, 0xcb, 0x4d, 0xe1, 0xf6, 0x88, 0xa0, - 0x9b, 0x29, 0x77, 0x76, 0xcb, 0xea, 0xc7, 0xc0, 0xad, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xd4, - 0xa2, 0xae, 0x10, 0x37, 0x10, 0x00, 0x00, + // 1415 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xcb, 0x6e, 0xdb, 0x46, + 0x17, 0x36, 0x49, 0x5b, 0xb6, 0x8e, 0x1c, 0x99, 0x19, 0xff, 0x71, 0x14, 0x3b, 0xd6, 0xef, 0x9f, + 0xff, 0x46, 0x71, 0x0a, 0x1b, 0x55, 0x12, 0xb4, 0x05, 0x12, 0xa4, 0x36, 0x9d, 0x22, 0x86, 0x91, + 0x0b, 0xc6, 0x0e, 0xdc, 0xb4, 0x28, 0x82, 0x11, 0x39, 0x96, 0x08, 0x53, 0x1c, 0x96, 0x33, 0x8a, + 0x93, 0x45, 0x57, 0x05, 0xba, 0x2a, 0xd0, 0x3e, 0x4b, 0xbb, 0xec, 0x03, 0xb4, 0xcb, 0x00, 0xdd, + 0x74, 0x59, 0x24, 0xaf, 0xd0, 0x07, 0x28, 0x66, 0x48, 0x8a, 0x17, 0xc9, 0x17, 0x35, 0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x77, 0xe0, 0xe7, 0x08, 0x38, 0x49, 0xf2, 0xbd, 0x03, 0x15, 0x47, 0x3d, 0xf6, 0x1c, + 0xea, 0xc4, 0x16, 0xc1, 0x09, 0x18, 0xd9, 0x50, 0xe7, 0xc9, 0xb9, 0x31, 0xa9, 0xd4, 0xab, 0xea, + 0xed, 0x95, 0x82, 0xfa, 0x7e, 0x01, 0x82, 0x4b, 0x2a, 0xd6, 0x53, 0x58, 0x7c, 0x44, 0xbc, 0x40, + 0x10, 0x2f, 0xa0, 0xd1, 0xc3, 0x54, 0x0f, 0x7d, 0x92, 0xcb, 0xec, 0xda, 0x18, 0xba, 0x64, 0x3a, + 0xe5, 0xd4, 0x6e, 0xfd, 0xa0, 0x83, 0x59, 0x5e, 0xbe, 0x90, 0x19, 0x56, 0x01, 0xe4, 0xe8, 0x85, + 0xdc, 0x89, 0x2a, 0x53, 0x54, 0x71, 0x55, 0xce, 0xc8, 0x3d, 0x28, 0xfa, 0x10, 0x66, 0xe2, 0x95, + 0x71, 0xaf, 0xb4, 0x59, 0x3f, 0x64, 0x01, 0x0d, 0x84, 0xc2, 0xe2, 0x18, 0x89, 0xfe, 0x0f, 0x97, + 0x32, 0x82, 0xbd, 0x10, 0x71, 0x8d, 0x29, 0x67, 0xf3, 0x42, 0x81, 0x31, 0x26, 0x2d, 0x30, 0xc6, + 0x05, 0x0a, 0xcc, 0x47, 0xb0, 0x62, 0x33, 0x16, 0xb9, 0x5e, 0x40, 0x04, 0x8b, 0xb6, 0x19, 0x13, + 0x5c, 0x44, 0x24, 0x4c, 0x29, 0xd2, 0x80, 0xd9, 0x97, 0x34, 0xe2, 0xd2, 0x81, 0x49, 0x0b, 0x90, + 0x88, 0xd6, 0x73, 0xb8, 0x3e, 0x5e, 0x31, 0x49, 0x01, 0xef, 0xe1, 0x25, 0x07, 0xfe, 0xb3, 0xe5, + 0xba, 0x19, 0x20, 0xbd, 0x4c, 0x1d, 0x74, 0xcf, 0x4d, 0xdc, 0xa3, 0x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xde, 0xa0, 0xb3, 0xe1, 0xb0, + 0xfe, 0xe6, 0x91, 0xcf, 0x4e, 0x3a, 0xb4, 0x47, 0xc2, 0xf0, 0xf5, 0xa6, 0xf0, 0xba, 0x44, 0xd0, + 0xcd, 0x9c, 0x3b, 0x3b, 0x15, 0xf5, 0x37, 0xe3, 0xd6, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x20, + 0xfb, 0x7a, 0xd4, 0xec, 0x10, 0x00, 0x00, } func (m *TableSpan) Marshal() (dAtA []byte, err error) { @@ -2992,6 +3064,44 @@ func (m *Table) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *SchemaIDChange) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SchemaIDChange) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SchemaIDChange) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NewSchemaID != 0 { + i = encodeVarintHeartbeat(dAtA, i, uint64(m.NewSchemaID)) + i-- + dAtA[i] = 0x18 + } + if m.OldSchemaID != 0 { + i = encodeVarintHeartbeat(dAtA, i, uint64(m.OldSchemaID)) + i-- + dAtA[i] = 0x10 + } + if m.TableID != 0 { + i = encodeVarintHeartbeat(dAtA, i, uint64(m.TableID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *State) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3012,6 +3122,20 @@ func (m *State) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.UpdatedSchemas) > 0 { + for iNdEx := len(m.UpdatedSchemas) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.UpdatedSchemas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintHeartbeat(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } if len(m.NeedAddedTables) > 0 { for iNdEx := len(m.NeedAddedTables) - 1; iNdEx >= 0; iNdEx-- { { @@ -3684,6 +3808,24 @@ func (m *Table) Size() (n int) { return n } +func (m *SchemaIDChange) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TableID != 0 { + n += 1 + sovHeartbeat(uint64(m.TableID)) + } + if m.OldSchemaID != 0 { + n += 1 + sovHeartbeat(uint64(m.OldSchemaID)) + } + if m.NewSchemaID != 0 { + n += 1 + sovHeartbeat(uint64(m.NewSchemaID)) + } + return n +} + func (m *State) Size() (n int) { if m == nil { return 0 @@ -3710,6 +3852,12 @@ func (m *State) Size() (n int) { n += 1 + l + sovHeartbeat(uint64(l)) } } + if len(m.UpdatedSchemas) > 0 { + for _, e := range m.UpdatedSchemas { + l = e.Size() + n += 1 + l + sovHeartbeat(uint64(l)) + } + } return n } @@ -6798,6 +6946,113 @@ func (m *Table) Unmarshal(dAtA []byte) error { } return nil } +func (m *SchemaIDChange) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHeartbeat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SchemaIDChange: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SchemaIDChange: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TableID", wireType) + } + m.TableID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHeartbeat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TableID |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OldSchemaID", wireType) + } + m.OldSchemaID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHeartbeat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OldSchemaID |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NewSchemaID", wireType) + } + m.NewSchemaID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHeartbeat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NewSchemaID |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipHeartbeat(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthHeartbeat + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *State) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6972,6 +7227,40 @@ func (m *State) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdatedSchemas", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowHeartbeat + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthHeartbeat + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthHeartbeat + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UpdatedSchemas = append(m.UpdatedSchemas, &SchemaIDChange{}) + if err := m.UpdatedSchemas[len(m.UpdatedSchemas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipHeartbeat(dAtA[iNdEx:]) diff --git a/heartbeatpb/heartbeat.proto b/heartbeatpb/heartbeat.proto index cd8d43386..9191338bf 100644 --- a/heartbeatpb/heartbeat.proto +++ b/heartbeatpb/heartbeat.proto @@ -160,12 +160,19 @@ message Table { int64 SchemaID = 2; } +message SchemaIDChange { + int64 TableID = 1; + int64 OldSchemaID = 2; + int64 NewSchemaID = 3; +} + message State { bool IsBlocked = 1; uint64 BlockTs = 2; InfluencedTables BlockTables = 3; InfluencedTables NeedDroppedTables =4; repeated Table NeedAddedTables = 5; + repeated SchemaIDChange UpdatedSchemas = 6; } message TableSpanStatus { diff --git a/pkg/common/event.go b/pkg/common/event.go index a28353de8..bfc27b1fb 100644 --- a/pkg/common/event.go +++ b/pkg/common/event.go @@ -362,6 +362,21 @@ type SchemaIDChange struct { NewSchemaID int64 } +func ToSchemaIDChangePB(SchemaIDChange []SchemaIDChange) []*heartbeatpb.SchemaIDChange { + if SchemaIDChange == nil { + return nil + } + res := make([]*heartbeatpb.SchemaIDChange, len(SchemaIDChange)) + for i, c := range SchemaIDChange { + res[i] = &heartbeatpb.SchemaIDChange{ + TableID: c.TableID, + OldSchemaID: c.OldSchemaID, + NewSchemaID: c.NewSchemaID, + } + } + return res +} + type DDLEvent struct { DispatcherID DispatcherID `json:"dispatcher_id"` Type byte `json:"type"` @@ -438,6 +453,10 @@ func (e *DDLEvent) GetNeedAddedTables() []Table { return e.NeedAddedTables } +func (e *DDLEvent) GetUpdatedSchemas() []SchemaIDChange { + return e.UpdatedSchemas +} + func (e *DDLEvent) IsSyncPointEvent() bool { // TODO return false