yuxiqian commented on code in PR #4064:
URL: https://github.com/apache/flink-cdc/pull/4064#discussion_r2502838226
##########
flink-cdc-connect/flink-cdc-source-connectors/flink-connector-mysql-cdc/src/main/java/org/apache/flink/cdc/connectors/mysql/debezium/reader/BinlogSplitReader.java:
##########
@@ -171,8 +173,33 @@ public Iterator<SourceRecords> pollSplitRecords() throws
InterruptedException {
Optional<SourceRecord> oscRecord =
parseOnLineSchemaChangeEvent(event.getRecord());
if (oscRecord.isPresent()) {
- sourceRecords.add(oscRecord.get());
- continue;
+ TableId tableId =
RecordUtils.getTableId(oscRecord.get());
+ if (tableId != null) {
+ LOG.info(
+ "Received the start event of online schema
change: {}. Save it for later.",
+ oscRecord.get());
+ pendingSchemaChangeEvents.put(tableId.toString(),
oscRecord.get());
+ continue;
+ }
+ }
+
+ Optional<String> finishedTables =
+
RecordUtils.parseOnLineSchemaRenameEvent(event.getRecord());
+ if (finishedTables.isPresent()) {
+ TableId tableId =
RecordUtils.getTableId(event.getRecord());
Review Comment:
Thanks @czy006 for reporting this, will try to fix this case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]