GitHub user halorgium opened a pull request:

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

    KAFKA-4725: Stop leaking messages in produce request body when requests are 
delayed

    This change is in response to 
[KAFKA-4725](https://issues.apache.org/jira/browse/KAFKA-4725). 
    
    When a produce request is received, if the user/client is exceeding their 
produce quota, the response will be delayed until the quota is refilled 
appropriately. 
    
    Unfortunately, the request body is still referenced in the callback which 
in turn leaks the messages contained within the request. 
    
    This change allows the `KafkaApis` method to take ownership of the request 
body from the `RequestChannel.Request` object. 
    
    I am not sure whether this breaks other invariants which are assumed within 
other parts of Kafka. 

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

    $ git pull https://github.com/heroku/kafka fix-throttled-response-leak

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

    https://github.com/apache/kafka/pull/2496.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 #2496
    
----
commit ddb0541b156db546fbf6e065670fb25d6e4baba2
Author: Tim Carey-Smith <[email protected]>
Date:   2017-02-01T23:18:43Z

    Stop leaking produce request in throttled requests
    
    Further isolate the request from the callbacks
    
    Remove pointless changes
    
    Move body ownership logic into RequestChannel

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to