From 45c831ae03b066caf7b23d1542cdb57e6c28028e Mon Sep 17 00:00:00 2001 From: nhsmw Date: Fri, 13 Sep 2024 18:27:02 +0800 Subject: [PATCH] sink(ticdc): reduce log print when using CDC sync data to Kafka with nil values in column (#11541) close pingcap/tiflow#11537 --- cdc/model/sink.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cdc/model/sink.go b/cdc/model/sink.go index d3e0d525bf7..d4b6876124f 100644 --- a/cdc/model/sink.go +++ b/cdc/model/sink.go @@ -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 }