Skip to content

Commit

Permalink
schemastore: fix load full table info failed (#999)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidezhu authored Feb 17, 2025
1 parent 510d0a3 commit 6210d2c
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/integration_test_mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ jobs:
run: |
export TICDC_NEWARCH=true && make integration_test CASE=changefeed_finish
- name: Test sql_mode
if: ${{ success() }}
run: |
export TICDC_NEWARCH=true && make integration_test CASE=sql_mode
# - name: Test sql_mode
# if: ${{ success() }}
# run: |
# export TICDC_NEWARCH=true && make integration_test CASE=sql_mode

- name: Test changefeed_pause_resume
if: ${{ success() }}
Expand Down
9 changes: 8 additions & 1 deletion logservice/schemastore/disk_format.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,13 @@ func loadAllPhysicalTablesAtTs(
if !ok {
log.Panic("unknown ddl type", zap.Any("ddlType", ddlEvent.Type), zap.String("query", ddlEvent.Query))
}
// Note: updateFullTableInfoFunc must be called before updateSchemaMetadataFunc,
// because it depends on some info which may be updated by updateSchemaMetadataFunc.
handler.updateFullTableInfoFunc(updateFullTableInfoFuncArgs{
event: &ddlEvent,
databaseMap: databaseMap,
tableInfoMap: tableInfoMap,
})
handler.updateSchemaMetadataFunc(updateSchemaMetadataFuncArgs{
event: &ddlEvent,
databaseMap: databaseMap,
Expand All @@ -696,7 +703,7 @@ func loadAllPhysicalTablesAtTs(
schemaName := databaseMap[tableInfo.SchemaID].Name
fullTableInfo, ok := tableInfoMap[tableID]
if !ok {
log.Error("table info not found", zap.Int64("tableID", tableID))
log.Panic("table info not found", zap.Int64("tableID", tableID))
}
if tableFilter != nil && tableFilter.ShouldIgnoreTable(schemaName, tableInfo.Name, fullTableInfo) {
continue
Expand Down
Loading

0 comments on commit 6210d2c

Please sign in to comment.