diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2016-10-21 23:10:39 -0400 |
---|---|---|
committer | Michael Cahill <michael.cahill@mongodb.com> | 2016-10-21 23:10:39 -0400 |
commit | b486c5ce2f342f4ec659b31764320d740ab40f46 (patch) | |
tree | f711932b7d3e869695d3e400e7ba4718e2b87cb9 /build_win | |
parent | ceeb57b565fca6ade4bb02d8cf62095374743bd1 (diff) | |
download | mongo-b486c5ce2f342f4ec659b31764320d740ab40f46.tar.gz |
WT-2880 Add Zstandard compression support (#3075)
* Fix a bug found by inspection in LZ4 code: we're going to offset the destination buffer by sizeof(LZ4_PREFIX), so we need to offset the destination buffer length by the same amount.
* Prettiness pass through the snappy driver so it and the zstd driver look the same, minor cleanup in zlib.
* Add the compression_level configuration option to the zstd extension initialization function so it's possible to set the compression level from an application.
* Fix a bug in zlib raw compression: the destination buffer size (dst_len), can be smaller than the target page size (page_max), use the smaller of the two values to set the target compression size.
* The zlib raw compression function could return without calling deflateEnd on its z_stream structures, potentially leaking memory and scratch buffers.
* If the default reserved bytes for zlib raw compression isn't sufficient, we fail on compression of what might be very large blocks. We don't have information on how many bytes need to be reserved in order to know the final deflate() will succeed, and the default value was experimentally derived, for all we know there are workloads where the default will fail
a lot. Add a fallback before failing hard, try with 2x the default reserved space.
Diffstat (limited to 'build_win')
-rw-r--r-- | build_win/wiredtiger_config.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/build_win/wiredtiger_config.h b/build_win/wiredtiger_config.h index 83ddc6eb194..78d2784cb70 100644 --- a/build_win/wiredtiger_config.h +++ b/build_win/wiredtiger_config.h @@ -19,6 +19,9 @@ /* Zlib support automatically loaded. */ /* #undef HAVE_BUILTIN_EXTENSION_ZLIB */ +/* ZSTD support automatically loaded. */ +/* #undef HAVE_BUILTIN_EXTENSION_ZSTD */ + /* Define to 1 if you have the `clock_gettime' function. */ /* #undef HAVE_CLOCK_GETTIME */ @@ -70,6 +73,9 @@ /* Define to 1 if you have the `z' library (-lz). */ /* #undef HAVE_LIBZ */ +/* Define to 1 if you have the `zstd' library (-lzstd). */ +/* #undef HAVE_LIBZSTD */ + /* Define to 1 if you have the <memory.h> header file. */ /* #undef HAVE_MEMORY_H */ |