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

A. Sophie Blee-Goldman commented on KAFKA-14294:
------------------------------------------------

I'm not sure that workaround would help, as it follows the same mechanism for 
requesting a commit as the actual invocation of the punctuator, which is what 
is "broken" by this bug. Specifically, both a punctuator invocation and the 
`context.commit` API just set the `commitNeeded` flag. However the bug here is 
that this flag is never checked at all, and we skip over the commit entirely 
when there are no new input records processed. The only guarantee is really to 
upgrade to a version with the fix, ie 3.4 or above

> Kafka Streams should commit transaction when no records are processed
> ---------------------------------------------------------------------
>
>                 Key: KAFKA-14294
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14294
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>    Affects Versions: 3.1.0, 3.2.1
>            Reporter: Vicky Papavasileiou
>            Assignee: A. Sophie Blee-Goldman
>            Priority: Major
>             Fix For: 3.4.0
>
>         Attachments: image-2023-02-08-10-22-20-456.png
>
>
> Currently, if there are no records to process in the input topic, a 
> transaction does not commit. If a custom punctuator code is writing to a 
> state store (which is common practice) the producer gets fenced when trying 
> to write to the changelog topic. This throws a TaskMigratedException and 
> causes a rebalance. 
> A better approach would be to commit a transaction even when there are no 
> records processed as to allow the punctuator to make progress. 



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

Reply via email to