Skip to content

Commit 1546491

Browse files
committed
add benign events handling to avoid warnings on those
1 parent 53126f2 commit 1546491

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

flow/connectors/mysql/cdc.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,9 @@ func (c *MySqlConnector) PullRecords(
658658
c.logger.Error("[mysql] received MariaDB partial row data event, resync required",
659659
slog.Uint64("eventType", uint64(mariadbPartialRowDataEvent)), slog.String("table", sourceTableName))
660660
return exceptions.NewMySQLUnsupportedPartialRowEventError(byte(mariadbPartialRowDataEvent), schemaName, tableName)
661+
case replication.STOP_EVENT, replication.RAND_EVENT, replication.USER_VAR_EVENT,
662+
replication.IGNORABLE_EVENT, replication.MARIADB_START_ENCRYPTION_EVENT:
663+
// safe to ignore because validation requires binlog_format=ROW
661664
default:
662665
recordUnsupportedEvent(ctx, event, "Generic")
663666
}
@@ -887,6 +890,13 @@ func (c *MySqlConnector) PullRecords(
887890
int64(event.Header.Timestamp),
888891
)
889892
}
893+
case *replication.FormatDescriptionEvent, *replication.PreviousGTIDsEvent,
894+
*replication.HeartbeatEvent, *replication.RowsQueryEvent, *replication.IntVarEvent,
895+
*replication.BeginLoadQueryEvent, *replication.ExecuteLoadQueryEvent,
896+
*replication.MariadbAnnotateRowsEvent, *replication.MariadbBinlogCheckPointEvent,
897+
*replication.MariadbGTIDListEvent, *replication.MariadbGTIDEvent:
898+
// benign events we intentionally don't process (binlog-file headers, heartbeats,
899+
// rows-query/SBR context, MariaDB GTID/annotate markers)
890900
default:
891901
recordUnsupportedEvent(ctx, event, "Untyped")
892902
}

0 commit comments

Comments
 (0)