Skip to content

Commit

Permalink
sink: fix bug when close sink (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongyunyan authored Dec 27, 2024
1 parent 9a45644 commit b0f354d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/sink/mysql/mysql_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,14 @@ func (w *MysqlWriter) RemoveDDLTsItem() error {

_, err = tx.Exec(query)
if err != nil {
if apperror.IsTableNotExistsErr(err) {
// If this table is not existed, this means the changefeed has not table, so we just return nil.
log.Info("ddl ts table is not found when RemoveDDLTsItem",
zap.String("namespace", w.ChangefeedID.Namespace()),
zap.String("changefeedID", w.ChangefeedID.Name()),
zap.Error(err))
return nil
}
log.Error("failed to delete ddl ts item ", zap.Error(err))
err2 := tx.Rollback()
if err2 != nil {
Expand Down

0 comments on commit b0f354d

Please sign in to comment.