Skip to content

Commit

Permalink
codec(cdc) Removing logging of message bodies to avoid PII issues (#9032
Browse files Browse the repository at this point in the history
) (#9116)

close #9031
  • Loading branch information
ti-chi-bot authored Jul 4, 2023
1 parent 30d73af commit 036ca3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions pkg/sink/codec/canal/canal_json_row_event_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,7 @@ func (c *JSONRowEventEncoder) AppendRowChangedEvent(
log.Warn("Single message is too large for canal-json",
zap.Int("maxMessageBytes", c.config.MaxMessageBytes),
zap.Int("length", length),
zap.Any("table", e.Table),
zap.Any("value", value))
zap.Any("table", e.Table))
return cerror.ErrMessageTooLarge.GenWithStackByArgs()
}
m := &common.Message{
Expand Down
3 changes: 1 addition & 2 deletions pkg/sink/codec/canal/canal_json_txn_event_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ func (j *JSONTxnEventEncoder) AppendTxnEvent(
log.Warn("Single message is too large for canal-json",
zap.Int("maxMessageBytes", j.config.MaxMessageBytes),
zap.Int("length", length),
zap.Any("table", row.Table),
zap.Any("value", value))
zap.Any("table", row.Table))
return cerror.ErrMessageTooLarge.GenWithStackByArgs()
}
j.valueBuf.Write(value)
Expand Down
3 changes: 1 addition & 2 deletions pkg/sink/codec/open/open_protocol_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ func (d *BatchEncoder) AppendRowChangedEvent(
zap.Int("maxMessageBytes", d.config.MaxMessageBytes),
zap.Int("length", length),
zap.Any("table", e.Table),
zap.Any("key", key),
zap.Any("value", value))
zap.Any("key", key))
return cerror.ErrMessageTooLarge.GenWithStackByArgs()
}

Expand Down

0 comments on commit 036ca3e

Please sign in to comment.