rreddy-22 opened a new pull request, #19910: URL: https://github.com/apache/kafka/pull/19910
When InitProducerId is handled on the transaction coordinator, the producer epoch is incremented (so that we fence stale requests), then if a transaction was ongoing during this time, it's aborted. With transaction version 2 (a.k.a. KIP-890 part 2), abort increments the producer epoch again (it's the part of the new abort / commit protocol), so the epoch ends up incremented twice. In most cases, this is benign, but in the case where the epoch of the ongoing transaction is 32766, it's incremented to 32767, which is the maximum value for short. Then, when it's incremented for the second time, it goes negative, causing an illegal argument exception. To fix this we just avoid bumping the epoch a second time. -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org