C0urante commented on a change in pull request #11382:
URL: https://github.com/apache/kafka/pull/11382#discussion_r793112244
##########
File path:
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java
##########
@@ -364,9 +365,16 @@ private boolean sendRecords() {
producerRecord,
(recordMetadata, e) -> {
if (e != null) {
- log.error("{} failed to send record to {}: ",
WorkerSourceTask.this, topic, e);
- log.trace("{} Failed record: {}",
WorkerSourceTask.this, preTransformRecord);
- producerSendException.compareAndSet(null, e);
+ if
(retryWithToleranceOperator.getErrorToleranceType().equals(ToleranceType.ALL)) {
+ // executeFailed here allows the use of
existing logging infrastructure/configuration
+
retryWithToleranceOperator.executeFailed(Stage.KAFKA_PRODUCE,
WorkerSourceTask.class,
+ preTransformRecord, e);
+ commitTaskRecord(preTransformRecord, null);
Review comment:
We should not be logging at `ERROR` level for every single record if we
aren't failing the task unless the user has explicitly enabled this by setting
`errors.log.enable` to `true` in their connector config.
--
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]