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

[jira] [Commented] (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: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)