New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-15091: Fix misleading Javadoc for SourceTask::commit #13948
KAFKA-15091: Fix misleading Javadoc for SourceTask::commit #13948
Conversation
* being committed won't necessarily correspond to the latest offsets returned by this source task via | ||
* {@link #poll()}. When exactly-once support is disabled, offsets are committed periodically and asynchronously | ||
* (i.e. on a separate thread from the one which calls {@link #poll()}). When exactly-once support is enabled, | ||
* offsets are committed on transaction commits (also see {@link TransactionBoundary}). | ||
* <p> | ||
* SourceTasks are not required to implement this functionality; Kafka Connect will record offsets | ||
* automatically. This hook is provided for systems that also need to store offsets internally |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on the fence on whether or not to remove this bit as well since I can't think of a realistic use-case where this method would help with offset tracking in the source system in its current form (and hence the question on deprecation of this method in https://issues.apache.org/jira/browse/KAFKA-15091).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "store offsets internally" language isn't great, but I'd rather leave it for now and explore it further if/when we start discussing deprecating this method. Connector developers might theoretically use this for acknowledging JMS records, for example, which in a very loose sense is storing offsets (or at least, some JMS-specific equivalent of them) in that system.
connect/api/src/main/java/org/apache/kafka/connect/source/SourceTask.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Yash!
Reviewers: Chris Egerton <chrise@aiven.io>
Reviewers: Chris Egerton <chrise@aiven.io>
Reviewers: Chris Egerton <chrise@aiven.io>
* ak/trunk: (110 commits) MINOR: Update docs to include ZK deprecation notice and information (apache#14031) KAFKA-15091: Fix misleading Javadoc for SourceTask::commit (apache#13948) KAFKA-14669: Use the generated docs for MirrorMaker configs in the doc (apache#13658) KAFKA-14953: Add tiered storage related metrics (apache#13944) KAFKA-15121: Implement the alterOffsets method in the FileStreamSourceConnector and the FileStreamSinkConnector (apache#13945) Revert "MINOR: Update .asf.yaml file with refreshed github_whitelist, and collaborators" (apache#14037) MINOR: Update .asf.yaml file with refreshed github_whitelist, and collaborators KAFKA-14737: Move kafka.utils.json to server-common (apache#13585) KAFKA-14647: Move TopicFilter to server-common/utils (apache#13158) MINOR: remove unused variable in examples (apache#14021) ...
) Reviewers: Chris Egerton <chrise@aiven.io> (cherry picked from commit 35d4e9e)
From https://issues.apache.org/jira/browse/KAFKA-15091:
Committer Checklist (excluded from commit message)