zhaohaidao opened a new pull request #9310: URL: https://github.com/apache/kafka/pull/9310
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. We can use abortableError to skip directly to InitProduceId. abortableError is used for recording the last abortable error. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
