GitHub user apurvam opened a pull request:

    https://github.com/apache/kafka/pull/3202

    KAFKA-5364: Don't fail producer if drained partition is not yet in 
transaction

    Due to the async nature of the producer, it is possible to attempt to drain 
a messages whose partition hasn't been added to the transaction yet. Before 
this patch, we considered this a fatal error. However, it is only in error if 
the partition isn't in the queue to be sent to the coordinator. 
    
    This patch updates the logic so that we only fail the producer if the 
partition would never be added to the transaction. If the partition of the 
batch is yet to be added, we will simply wait for the partition to be added to 
the transaction before sending the batch to the broker.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apurvam/kafka 
KAFKA-5364-ensure-partitions-added-to-txn-before-send

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/3202.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 #3202
    
----
commit 7dd2f7f9c3c59c80ed0cac4965df819a8c7ddcbb
Author: Apurva Mehta <apu...@confluent.io>
Date:   2017-06-02T00:18:08Z

    Fix logic in ensurePartitionAddedToTransaction to account for partitions 
which would be added to the transaction.

----


---
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.
---

Reply via email to