GitHub user apurvam opened a pull request: https://github.com/apache/kafka/pull/4137
KAFKA-6119: Bump epoch when expiring transactions in the TransactionCoordinator A description of the problem is in the JIRA. I have added an integration test which reproduces the original scenario, and also added unit test cases. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apurvam/kafka KAFKA-6119-bump-epoch-when-expiring-transactions Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/4137.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #4137 ---- commit 4405e4f9c30e82864417fdbafe3817ee4acee661 Author: Apurva Mehta <apu...@confluent.io> Date: 2017-10-26T00:58:44Z Bump the epoch when we abort a transaction on the coordinator commit 9945b4f8315dc8c82aaeb003c07458a6231ee96c Author: Apurva Mehta <apu...@confluent.io> Date: 2017-10-26T01:06:04Z Lock the transaction metadata before fencing the epoch. Make the case matching exhaustive ---- ---