You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (Jira)" <ji...@apache.org> on 2022/11/08 00:20:00 UTC
[jira] [Commented] (KAFKA-14294) Kafka Streams should commit transaction when no records are processed
[ https://issues.apache.org/jira/browse/KAFKA-14294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17630098#comment-17630098 ]
Matthias J. Sax commented on KAFKA-14294:
-----------------------------------------
Why do you think we don't commit? Based on the code, we should commit: StreamTask has a flag `commitNeeded` that is set to `true` after a punctuation executed.
> 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.2.1
> Reporter: Vicky Papavasileiou
> Priority: Major
>
> 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)