rreddy-22 opened a new pull request, #23630: URL: https://github.com/apache/kafka/pull/23630
After a broker loses leadership of a __transaction_state partition, its TransactionStateManager keeps the partition's cache entry until TransactionCoordinator.onResignation runs, which happens after the replica has already become a follower. Answers decided purely from that cache are never fenced, so a TV2 EndTxn(COMMIT) that lands in this window can get a fatal INVALID_TXN_STATE instead of NOT_COORDINATOR. Only use a cache entry while the local replica still leads the partition at the entry's coordinator epoch, and return NOT_COORDINATOR otherwise so the client rediscovers the new coordinato -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
