twthorn opened a new pull request, #18146: URL: https://github.com/apache/kafka/pull/18146
Ticket [KAFKA-18073](https://issues.apache.org/jira/browse/KAFKA-18073) If the conversion call fails (e.g., connectivity issue to Schema Registry, Avro exception) then even with errors.tolerance set to None (the default) we will still drop the record. This causes silent & unexpected data loss by default for any Kafka Connect source connector. We should prevent this and fail loudly and not drop records if the conversion call fails. ### Changes In order to ensure we preserve the behavior added in https://github.com/apache/kafka/pull/13955 we create a separate check for the transformed records. For the converted (ie producer records) we handle based on the errors.tolerance. Also add a couple helper methods to DRY up the code. ### Testing Ensured tests added in https://github.com/apache/kafka/pull/13955 still pass. Also add two tests to test the two new logical branches depending on errorrs.tolerance. *More detailed description of your change, if necessary. The PR title and PR message become the squashed commit message, so use a separate comment to ping reviewers.* *Summary of testing strategy (including rationale) for the feature or bug fix. Unit and/or integration tests are expected for any behaviour change and system tests should be considered for larger changes.* ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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]
