Skip to content

Commit

Permalink
sink(ticdc): reduce log print when using CDC sync data to Kafka with …
Browse files Browse the repository at this point in the history
…nil values in column (#11541)

close #11537
  • Loading branch information
wk989898 authored Sep 13, 2024
1 parent e374334 commit 45c831a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cdc/model/sink.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,15 +488,17 @@ func columnDatas2Columns(cols []*ColumnData, tableInfo *TableInfo) []*Column {
return nil
}
columns := make([]*Column, len(cols))
nilColumnNum := 0
for i, colData := range cols {
if colData == nil {
log.Warn("meet nil column data, should not happened in production env",
zap.Any("cols", cols),
zap.Any("tableInfo", tableInfo))
nilColumnNum++
continue
}
columns[i] = columnData2Column(colData, tableInfo)
}
log.Debug("meet nil column data",
zap.Any("nilColumnNum", nilColumnNum),
zap.Any("tableInfo", tableInfo))
return columns
}

Expand Down

0 comments on commit 45c831a

Please sign in to comment.