vamossagar12 commented on code in PR #13726:
URL: https://github.com/apache/kafka/pull/13726#discussion_r1216322429


##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractWorkerSourceTask.java:
##########
@@ -458,13 +458,8 @@ boolean sendRecords() {
     }
 
     protected List<SourceRecord> poll() throws InterruptedException {
-        try {
-            return task.poll();
-        } catch (RetriableException | 
org.apache.kafka.common.errors.RetriableException e) {
-            log.warn("{} failed to poll records from SourceTask. Will retry 
operation.", this, e);
-            // Do nothing. Let the framework poll whenever it's ready.
-            return null;
-        }
+        retryWithToleranceOperator.reset();
+        return retryWithToleranceOperator.execute(task::poll, Stage.TASK_POLL, 
this.getClass());

Review Comment:
   The way I understood it is the number of operations that have failed and 
that's independent of the number of records in the batch. That's what the 
subtle difference in naming seems to be suggest to me 
   
   ```
   recordProcessingFailures = createTemplate("total-record-failures", 
TASK_ERROR_HANDLING_GROUP_NAME,
                   "The number of record processing failures in this task.", 
taskErrorHandlingTags);
   recordProcessingErrors = createTemplate("total-record-errors", 
TASK_ERROR_HANDLING_GROUP_NAME,
                   "The number of record processing errors in this task. ", 
taskErrorHandlingTags);
   recordsSkipped = createTemplate("total-records-skipped", 
TASK_ERROR_HANDLING_GROUP_NAME,
                   "The number of records skipped due to errors.", 
taskErrorHandlingTags);
   ```
   i.e The number of `records` v/s The number of `record processing`. Does that 
make sense or am I reading too much between the lines?
   



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to