gharris1727 commented on code in PR #18146:
URL: https://github.com/apache/kafka/pull/18146#discussion_r1880832458
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractWorkerSourceTask.java:
##########
@@ -396,12 +396,25 @@ boolean sendRecords() {
for (final SourceRecord preTransformRecord : toSend) {
ProcessingContext<SourceRecord> context = new
ProcessingContext<>(preTransformRecord);
final SourceRecord record = transformationChain.apply(context,
preTransformRecord);
+ // If the result of a transformation is null, then the record
should be filtered/skipped & there was no error
+ if (record == null) {
Review Comment:
The "retriable exception causes data loss" also applies to the
transformations. If the transformation chain gives up retrying, it will return
`null` with context.failed().
I think you can let the `null` pass through `convertTransformedRecord`, and
then have separate null and context.failed() checks there that cover all of the
transformation and conversion steps.
--
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]