C0urante opened a new pull request #11323:
URL: https://github.com/apache/kafka/pull/11323


   [Jira](https://issues.apache.org/jira/browse/KAFKA-12226)
   
   Replaces https://github.com/apache/kafka/pull/10112
   
   Replaces the current batch-based logic for offset commits with a dynamic, 
non-blocking approach outlined in discussion on #10112 
[here](https://github.com/apache/kafka/pull/10112#issuecomment-910510910), 
[here](https://github.com/apache/kafka/pull/10112#issuecomment-910540773), 
[here](https://github.com/apache/kafka/pull/10112#issuecomment-914348989), 
[here](https://github.com/apache/kafka/pull/10112#issuecomment-914547745), and 
[here](https://github.com/apache/kafka/pull/10112#issuecomment-915350922).
   
   Essentially, a deque is kept for every source partition that a source task 
produces records for, and each element in that deque is a `SubmittedRecord` 
with a flag to track whether the producer has ack'd the delivery of that source 
record to Kafka yet. Periodically, the worker (on the same thread that polls 
the source task for records and transforms, converts, and dispatches them to 
the producer) polls acknowledged elements from the beginning of each of these 
deques and collects the latest offsets from these elements, storing them in a 
snapshot that is then committed on the separate source task offset thread.
   
   The behavior of the `offset.flush.timeout.ms` property is retained, but 
essentially now only applies to the actual writing of offset data to the 
internal offsets topic (if running in distributed mode) or the offsets file (if 
running in standalone mode). No time is spent during 
`WorkerSourceTask::commitOffsets` blocking on the acknowledgment of records by 
the producer.
   
   ### 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: jira-unsubscr...@kafka.apache.org

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


Reply via email to