Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bugFix][Connector-V2][CDC] SeaTunnelRowDebeziumDeserializationConverters NPE #7119

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ private void deserializeDataChangeRecord(SourceRecord record, Collector<SeaTunne
delete.setRowKind(RowKind.DELETE);
delete.setTableId(tableId);
collector.collect(delete);
} else {
} else if (operation == Envelope.Operation.UPDATE) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to update related statements, are there any other statements that can reach the else block?

Copy link
Contributor Author

@Asura7969 Asura7969 Jul 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TRUNCATE or MESSAGE
Can we ignore these two operations? then like:

 else {
      log.warn("Received {} operation, skip", operation);
  }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should ignore it. cc @hailin0

SeaTunnelRow before = extractBeforeRow(converters, record, messageStruct, valueSchema);
before.setRowKind(RowKind.UPDATE_BEFORE);
before.setTableId(tableId);
Expand All @@ -194,6 +194,8 @@ private void deserializeDataChangeRecord(SourceRecord record, Collector<SeaTunne
after.setRowKind(RowKind.UPDATE_AFTER);
after.setTableId(tableId);
collector.collect(after);
} else {
log.warn("Received {} operation, skip", operation);
}
}

Expand Down
Loading