You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Yash Mayya (Jira)" <ji...@apache.org> on 2023/06/14 17:54:00 UTC

[jira] [Commented] (KAFKA-15091) Javadocs for SourceTask::commit are incorrect

    [ https://issues.apache.org/jira/browse/KAFKA-15091?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17732666#comment-17732666 ] 

Yash Mayya commented on KAFKA-15091:
------------------------------------

{quote}{{it does not have anything to do with the offsets returned from {{SourceTask:poll}} and is instead just a general, periodically-invoked hook to let the task know that an offset commit has taken place (but with no guarantees as to which offsets have been committed and which ones correspond to still-in-flight records).}}
{quote}
 

The SourceTask::commit method doesn't seem like a particularly useful hook in its current shape; I wonder whether we should consider deprecating it...?

> Javadocs for SourceTask::commit are incorrect
> ---------------------------------------------
>
>                 Key: KAFKA-15091
>                 URL: https://issues.apache.org/jira/browse/KAFKA-15091
>             Project: Kafka
>          Issue Type: Bug
>          Components: KafkaConnect
>            Reporter: Chris Egerton
>            Priority: Major
>
> The Javadocs for {{SourceTask::commit}} state that the method should:
> {quote}Commit the offsets, up to the offsets that have been returned by [{{poll()}}|https://kafka.apache.org/34/javadoc/org/apache/kafka/connect/source/SourceTask.html#poll()].
> {quote}
> However, this is obviously incorrect given how the Connect runtime (when not configured with exactly-once support for source connectors) performs polling and offset commits on separate threads. There's also some extensive discussion on the semantics of that method in KAFKA-5716 where it's made clear that altering the behavior of the runtime to align with the documented semantics of that method is not a viable option.
> We should update the Javadocs for this method to state that it does not have anything to do with the offsets returned from {{SourceTask:poll}} and is instead just a general, periodically-invoked hook to let the task know that an offset commit has taken place (but with no guarantees as to which offsets have been committed and which ones correspond to still-in-flight records).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)