[ 
https://issues.apache.org/jira/browse/KAFKA-14880?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Jacot resolved KAFKA-14880.
---------------------------------
    Fix Version/s: 3.2.4
                   3.1.3
                   3.0.3
                   3.4.1
                   3.3.3
       Resolution: Fixed

> TransactionMetadata with producer epoch -1 should be expirable 
> ---------------------------------------------------------------
>
>                 Key: KAFKA-14880
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14880
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 3.1.0, 3.0.0, 3.2.0, 3.3.0, 3.4.0
>            Reporter: David Jacot
>            Assignee: David Jacot
>            Priority: Major
>             Fix For: 3.2.4, 3.1.3, 3.0.3, 3.4.1, 3.3.3
>
>
> We have seen the following error in logs:
> {noformat}
> "Mar 22, 2019 @ 
> 21:57:56.655",Error,"kafka-0-0","transaction-log-manager-0","Uncaught 
> exception in scheduled task 
> 'transactionalId-expiration'","java.lang.IllegalArgumentException: Illegal 
> new producer epoch -1
> {noformat}
> Investigations showed that it is actually possible for a transaction metadata 
> object to still have -1 as producer epoch when it transitions to Dead.
> When a transaction metadata is created for the first time (in 
> handleInitProducerId), it has -1 as its producer epoch. Then a producer epoch 
> is attributed and the transaction coordinator tries to persist the change. If 
> the write fail for instance because there is an under min isr, the 
> transaction metadata remains with its epoch as -1 forever or until the init 
> producer id is retried.
> This means that it is possible for transaction metadata to remain with -1 as 
> producer epoch until it gets expired. At the moment, this is not allowed 
> because we enforce a producer epoch greater or equals to 0 in 
> prepareTransitionTo.



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

Reply via email to