GitHub user apurvam opened a pull request:
https://github.com/apache/kafka/pull/3252
KAFKA-5385: ProducerBatch expiry should go through Sender.failBatch
Before this patch, we would call `producerBatch.done` directly from the
accumulator when expiring batches. This meant that we would not transition to
the `ABORTABLE_ERROR` state in the transaction manager, allowing other
transactional requests (including Commits!) to go through, even the produce
failed.
This patch modifies the logic so that we call `Sender.failBatch` on every
expired batch, thus ensuring that the transaction state is accurate.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apurvam/kafka
KAFKA-5385-fail-transaction-if-batches-expire
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/3252.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 #3252
commit 20768261ad83c8ce13ab135d22907d3f35013e34
Author: Apurva Mehta
Date: 2017-06-06T22:33:33Z
WIP
commit 3b50c5ed56cb696c708c59676f818f4bc0a3a3be
Author: Apurva Mehta
Date: 2017-06-07T04:50:44Z
Batch expiry should go through Sender.failBatch so that the transactional
state is set correctly
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---