[
https://issues.apache.org/jira/browse/KAFKA-5604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17062006#comment-17062006
]
Guozhang Wang commented on KAFKA-5604:
--------------------------------------
[~iamabug] There are some context missing from this comment: the abortTxn
should only be called if there's still an in-flight txn during close, which
means that the closing logic did not get triggered, which means that the task
got some error state. However, in the past if a previous producer call (e.g.
send, or sendOffsetsToTxn) get fenced with an exception, when calling abortTxn
here we would not get the same fenced exception again but an
IllegalStateException is thrown.
I will file a quick PR to remove this on the Streams side to clear it up, so no
worries here.
> All producer methods should raise `ProducerFencedException` after the first
> time.
> ---------------------------------------------------------------------------------
>
> Key: KAFKA-5604
> URL: https://issues.apache.org/jira/browse/KAFKA-5604
> Project: Kafka
> Issue Type: Bug
> Reporter: Apurva Mehta
> Assignee: Apurva Mehta
> Priority: Major
>
> Currently, when a `ProducerFencedException` is raised from a transactional
> producer, the expectation is that the application should call `close`
> immediately. However, if the application calls other producer methods, they
> would get a `KafkaException`. This is a bit confusing, and results in tickets
> like : https://issues.apache.org/jira/browse/KAFKA-5603.
> We should update the producer so that calls to any method other than `close`
> should raise a `ProducerFencedException` after the first time it is raised.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)