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

Boyang Chen commented on KAFKA-10504:
-------------------------------------

Is this optimization necessary?

> It will not work to skip to InitProducerId as lastError is always null
> ----------------------------------------------------------------------
>
>                 Key: KAFKA-10504
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10504
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>            Reporter: HaiyuanZhao
>            Assignee: HaiyuanZhao
>            Priority: Major
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> Kafka-8805 introduced an optimization for txn abort process: If the last 
> error is an INVALID_PRODUCER_ID_MAPPING error, skip directly to InitProduceId.
> However this optimization will not work as the var lastError is always null. 
> Because the txn state will transit to ABORTING_TRANSACTION from 
> ABORTABLE_ERROR when beginAbort is called, and the lastError will updated to 
> null.
> So then EndTxn is always called before InitProduceId.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to