Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dm: track table schema for online ddl when use binlog skip (#9700) #9705

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion dm/syncer/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2839,8 +2839,18 @@ func (s *Syncer) trackOriginDDL(ev *replication.QueryEvent, ec eventContext) (ma
return nil, err
}

affectedTbls := make(map[string]map[string]struct{})
for _, sql := range qec.splitDDLs {
sqls, err := s.ddlWorker.processOneDDL(qec, sql)
if err != nil {
s.tctx.L().Warn("processOneDDL failed", zap.Error(err))
qec.appliedDDLs = append(qec.appliedDDLs, sql)
} else {
qec.appliedDDLs = append(qec.appliedDDLs, sqls...)
}
}

affectedTbls := make(map[string]map[string]struct{})
for _, sql := range qec.appliedDDLs {
ddlInfo, err := s.ddlWorker.genDDLInfo(qec, sql)
if err != nil {
return nil, err
Expand Down
Loading