Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files for lz4 1.9.4 #4726

Merged
merged 6 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .formatignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ src/lz4frame.c
src/lz4frame.h
src/lz4hc.c
src/lz4hc.h
src/rdxxhash.c
src/rdxxhash.h
src/queue.h
src/crc32c.c
src/crc32c.h
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# librdkafka v2.5.0

librdkafka v2.5.0 is a feature release.

## Enhancements

* Update bundled lz4 (used when `./configure --disable-lz4-ext`) to
[v1.9.4](https://github.com/lz4/lz4/releases/tag/v1.9.4), which contains
bugfixes and performance improvements (#4726).


# librdkafka v2.4.0

librdkafka v2.4.0 is a feature release:
Expand Down
4 changes: 2 additions & 2 deletions LICENSE.lz4
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
src/rdxxhash.[ch] src/lz4*.[ch]: git@github.com:lz4/lz4.git e2827775ee80d2ef985858727575df31fc60f1f3
src/rdxxhash.[ch] src/lz4*.[ch]: git@github.com:lz4/lz4.git 5ff839680134437dbf4678f3d0c7b371d84f4964

LZ4 Library
Copyright (c) 2011-2016, Yann Collet
Copyright (c) 2011-2020, Yann Collet
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
4 changes: 2 additions & 2 deletions LICENSES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ THE SOFTWARE

LICENSE.lz4
--------------------------------------------------------------
src/rdxxhash.[ch] src/lz4*.[ch]: git@github.com:lz4/lz4.git e2827775ee80d2ef985858727575df31fc60f1f3
src/rdxxhash.[ch] src/lz4*.[ch]: git@github.com:lz4/lz4.git 5ff839680134437dbf4678f3d0c7b371d84f4964

LZ4 Library
Copyright (c) 2011-2016, Yann Collet
Copyright (c) 2011-2020, Yann Collet
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion configure.self
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mkl_toggle_option "Development" ENABLE_VALGRIND "--enable-valgrind" "Enable in-c

mkl_toggle_option "Development" ENABLE_REFCNT_DEBUG "--enable-refcnt-debug" "Enable refcnt debugging" "n"

mkl_toggle_option "Feature" ENABLE_LZ4_EXT "--enable-lz4-ext" "Enable external LZ4 library support (builtin version 1.9.3)" "y"
mkl_toggle_option "Feature" ENABLE_LZ4_EXT "--enable-lz4-ext" "Enable external LZ4 library support (builtin version 1.9.4)" "y"
mkl_toggle_option "Feature" ENABLE_LZ4_EXT "--enable-lz4" "Deprecated: alias for --enable-lz4-ext" "y"

mkl_toggle_option "Feature" ENABLE_REGEX_EXT "--enable-regex-ext" "Enable external (libc) regex (else use builtin)" "y"
Expand Down
30 changes: 30 additions & 0 deletions src/README.lz4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Instructions for Updating LZ4 Version

This document describes the steps to update the bundled lz4 version, that is,
the version used when `./configure` is run with `--disable-lz4-ext`.

1. For each file in the [lz4 repository's](https://github.com/lz4/lz4/) `lib`
directory (checked out to the appropriate version tag), copy it into the
librdkafka `src` directory, overwriting the previous files.
2. Copy `xxhash.h` and `xxhash.c` files, and rename them to `rdxxhash.h` and
`rdxxhash.c`, respectively, replacing the previous files. Change any
`#include`s of `xxhash.h` to `rdxxhash.h`.
3. Replace the `#else` block of the
`#if defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)`
with the following code, including the comment:
```c
#else
/* NOTE: While upgrading the lz4 version, replace the original `#else` block
* in the code with this block, and retain this comment. */
struct rdkafka_s;
extern void *rd_kafka_mem_malloc(struct rdkafka_s *rk, size_t s);
extern void *rd_kafka_mem_calloc(struct rdkafka_s *rk, size_t n, size_t s);
extern void rd_kafka_mem_free(struct rdkafka_s *rk, void *p);
# define ALLOC(s) rd_kafka_mem_malloc(NULL, s)
# define ALLOC_AND_ZERO(s) rd_kafka_mem_calloc(NULL, 1, s)
# define FREEMEM(p) rd_kafka_mem_free(NULL, p)
#endif
```
4. Change version mentioned for lz4 in `configure.self`.
4. Run `./configure` with `--disable-lz4-ext` option, make and run test 0017.
5. Update CHANGELOG.md and both the lz4 LICENSE, and the combined LICENSE.
Loading