Hello Marton Greber, Attila Bukor, Kudu Jenkins, Abhishek Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22568
to look at the new patch set (#4).
Change subject: KUDU-3647 more robust zlib wrapper code
......................................................................
KUDU-3647 more robust zlib wrapper code
This patch introduces much more robust error handling for both
zlib::{CompressLevel,Uncompress}() utility wrappers and fixes a few bugs
introduced along with other modifications in [1]. In addition, the code
now follows the documented API of zlib's inflate()/deflate() more
closely per docs [2] and example [3], while zlib::CompressLevel()
no longer allocates memory on the heap and uses a much smaller
stack-allocated buffer. It seems a larger heap-allocated buffer was
necessary to paper over mistakes of not properly using the API of
zlib's deflate().
This patch also adds a few test scenarios to cover the main functionality of
zlib::CompressLevel() and zlib::Uncompress(), and also a few specific
conditions attributed to truncated and corrupted input data that's fed
into zlib::Uncompress().
[1] https://issues.apache.org/jira/browse/KUDU-3201
[2] https://zlib.net/zlib_how.html
[3] https://zlib.net/zpipe.c
Change-Id: I5babcaf0a07c284d44f16201aa765e277b6464d3
---
M src/kudu/util/CMakeLists.txt
A src/kudu/util/zlib-test.cc
M src/kudu/util/zlib.cc
M src/kudu/util/zlib.h
4 files changed, 236 insertions(+), 37 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/68/22568/4
--
To view, visit http://gerrit.cloudera.org:8080/22568
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5babcaf0a07c284d44f16201aa765e277b6464d3
Gerrit-Change-Number: 22568
Gerrit-PatchSet: 4
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>