You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "HaiyuanZhao (Jira)" <ji...@apache.org> on 2020/09/19 14:49:00 UTC

[jira] [Updated] (KAFKA-10504) It will not work to skip to InitProducerId as lastError is always null

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

HaiyuanZhao updated KAFKA-10504:
--------------------------------
    Description: 
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.

 

  was:
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.

 


> 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)