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

ASF GitHub Bot commented on KAFKA-6906:
---------------------------------------

mjsax closed pull request #5196: MINOR: code cleanup follow up for KAFKA-6906
URL: https://github.com/apache/kafka/pull/5196
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java
 
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java
index 4cea5280f86..c4305624ec1 100644
--- 
a/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java
+++ 
b/streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamTask.java
@@ -438,11 +438,6 @@ private void commitOffsets(final boolean 
startNewTransaction) {
                     transactionInFlight = true;
                 }
             }
-
-            if (eosEnabled && !startNewTransaction && transactionInFlight) { 
// need to make sure to commit txn for suspend case
-                producer.commitTransaction();
-                transactionInFlight = false;
-            }
         } catch (final CommitFailedException | ProducerFencedException fatal) {
             throw new TaskMigratedException(this, fatal);
         }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Kafka Streams does not commit transactions if data is produced via wall-clock 
> punctuation
> -----------------------------------------------------------------------------------------
>
>                 Key: KAFKA-6906
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6906
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 1.1.0
>            Reporter: Matthias J. Sax
>            Assignee: Jagadesh Adireddi
>            Priority: Major
>             Fix For: 2.0.0, 0.11.0.3, 1.0.2, 1.1.1
>
>
> Committing in Kafka Streams happens in regular intervals. However, committing 
> only happens if new input records got processed since the last commit (via 
> setting flag `commitOffsetNeeded` within `StreamTask#process()`)
> However, data could also be emitted via wall-clock based punctuation calls. 
> Especially if EOS is enabled, this is an issue (maybe also for non-EOS) 
> because the current running transaction is not committed and thus might time 
> out leading to a fatal error.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to