diff --git a/logservice/schemastore/persist_storage.go b/logservice/schemastore/persist_storage.go index 477210181..0e1ebe110 100644 --- a/logservice/schemastore/persist_storage.go +++ b/logservice/schemastore/persist_storage.go @@ -743,11 +743,31 @@ func shouldSkipDDL(job *model.Job, tableMap map[int64]*BasicTableInfo) bool { return true } // DDLs ignored - case model.ActionCreateSequence, + case model.ActionLockTable, + model.ActionUnlockTable, + model.ActionRepairTable, + model.ActionSetTiFlashReplica, + model.ActionUpdateTiFlashReplicaStatus, + model.ActionCreateSequence, model.ActionAlterSequence, model.ActionDropSequence, + model.ActionModifyTableAutoIDCache, + model.ActionRebaseAutoRandomBase, + model.ActionAddCheckConstraint, + model.ActionDropCheckConstraint, + model.ActionAlterCheckConstraint, model.ActionAlterTableAttributes, model.ActionAlterTablePartitionAttributes, + model.ActionCreatePlacementPolicy, + model.ActionAlterPlacementPolicy, + model.ActionDropPlacementPolicy, + model.ActionAlterTablePartitionPlacement, + model.ActionModifySchemaDefaultPlacement, + model.ActionAlterTablePlacement, + model.ActionAlterCacheTable, + model.ActionAlterNoCacheTable, + model.ActionFlashbackCluster, + model.ActionRecoverSchema, model.ActionCreateResourceGroup, model.ActionAlterResourceGroup, model.ActionDropResourceGroup: diff --git a/logservice/schemastore/persist_storage_ddl_handlers.go b/logservice/schemastore/persist_storage_ddl_handlers.go index 54232e600..91b00afc4 100644 --- a/logservice/schemastore/persist_storage_ddl_handlers.go +++ b/logservice/schemastore/persist_storage_ddl_handlers.go @@ -308,15 +308,6 @@ var allDDLHandlers = map[model.ActionType]*persistStorageDDLHandler{ extractTableInfoFunc: extractTableInfoFuncIgnore, buildDDLEventFunc: buildDDLEventForModifySchemaCharsetAndCollate, }, - model.ActionSetTiFlashReplica: { - buildPersistedDDLEventFunc: buildPersistedDDLEventForNormalDDLOnSingleTable, - updateDDLHistoryFunc: updateDDLHistoryForNormalDDLOnSingleTable, - updateSchemaMetadataFunc: updateSchemaMetadataIgnore, - iterateEventTablesFunc: iterateEventTablesForSingleTableDDL, - extractTableInfoFunc: extractTableInfoFuncForSingleTableDDL, - buildDDLEventFunc: buildDDLEventForNormalDDLOnSingleTableForTiDB, - }, - model.ActionAddPrimaryKey: { buildPersistedDDLEventFunc: buildPersistedDDLEventForNormalDDLOnSingleTable, updateDDLHistoryFunc: updateDDLHistoryForNormalDDLOnSingleTable, diff --git a/logservice/schemastore/persist_storage_test.go b/logservice/schemastore/persist_storage_test.go index f03c855db..783659634 100644 --- a/logservice/schemastore/persist_storage_test.go +++ b/logservice/schemastore/persist_storage_test.go @@ -1719,7 +1719,6 @@ func TestApplyDDLJobs(t *testing.T) { buildModifyTableCharsetJobForTest(100, 300, 1040, charset.CharsetUTF8MB4), buildAlterTTLJobForTest(100, 300, 1050), buildRemoveTTLJobForTest(100, 300, 1060), - buildSetTiFlashReplicaJobForTest(100, 300, 1070), buildMultiSchemaChangeJobForTest(100, 300, 1080), buildAddColumnJobForTest(100, 300, 1090), buildDropColumnJobForTest(100, 300, 1100), @@ -1743,7 +1742,7 @@ func TestApplyDDLJobs(t *testing.T) { }, }, map[int64][]uint64{ - 300: {1010, 1020, 1030, 1040, 1050, 1060, 1070, 1080, 1090, 1100, 1110}, + 300: {1010, 1020, 1030, 1040, 1050, 1060, 1080, 1090, 1100, 1110}, }, []uint64{1110, 1120}, nil, diff --git a/logservice/schemastore/persist_storage_test_utils.go b/logservice/schemastore/persist_storage_test_utils.go index 45cfb39aa..50c7f56d5 100644 --- a/logservice/schemastore/persist_storage_test_utils.go +++ b/logservice/schemastore/persist_storage_test_utils.go @@ -508,18 +508,6 @@ func buildRemoveTTLJobForTest(schemaID, tableID int64, finishedTs uint64) *model } } -func buildSetTiFlashReplicaJobForTest(schemaID, tableID int64, finishedTs uint64) *model.Job { - return &model.Job{ - Type: model.ActionSetTiFlashReplica, - SchemaID: schemaID, - TableID: tableID, - BinlogInfo: &model.HistoryInfo{ - TableInfo: newEligibleTableInfoForTest(tableID, fmt.Sprintf("t_%d", tableID)), - FinishedTS: finishedTs, - }, - } -} - func buildMultiSchemaChangeJobForTest(schemaID, tableID int64, finishedTs uint64) *model.Job { return &model.Job{ Type: model.ActionMultiSchemaChange,