You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/05/02 00:24:30 UTC

[GitHub] [kafka] radai-rosenblatt opened a new pull request #10624: KAFKA-12605 - make GZIP decompression use BufferSupplier

radai-rosenblatt opened a new pull request #10624:
URL: https://github.com/apache/kafka/pull/10624


   as laid out in https://issues.apache.org/jira/browse/KAFKA-12605 kafka consumers decoding gzip'ed payloads currently do not re-use memory buffers because the JDK classes used have no support for it.
   
   this PR adds buffer reuse support to gzip decoding.
   
   unfortunately, since the JDK classes involved are not properly extensible I've had to make copies of them. modification to these copies are kept minimal:
   
   1. buffers now come from, and are returned to, suppliers
   2. some use of Unsafe has been replaced with more portable code
   3. minor changes required to comply with kafka's checkstyle
   4. KafkaBufferedInputStream does not fully support the mark() operation as that may involve buffer re-allocation. I have not found any usage of mark() in kafka code though.
   
   so far only decompression is supported. compression may be added later.
   
   a (randomized) test has been added that I have run on my machine for several hours with no issues.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org