Skip to content

Commit 2f3d0e6

Browse files
anchitjemasabmilindljanjwerner-confluent
authored
Backport 4438 to 2.2.0 (#4914)
* Fix for idempotent producer fatal errors, triggered after a possibly persisted message state (#4438) * Remove CentOS 6 and CentOS 7 binaries (#4775) *Remove CentOS 6 and 7 support as discontinued, keeps using manylinux_2_28 based on AlmaLinux 8 (CentOS 8) * Remove fix for CentOS 6 * Add CHANGELOG entry * Upgrade test and verify package creation or installation using clients repository * Upgrade msvcr140 and vcpkg dependencies (#4872) * Add forward declaration to fix compilation without ssl (#4794) and add build checks with different configurations * PR comments * Add files for lz4 1.9.4 (#4726) * Add files for lz4 1.9.4 * Update changelog.md * rdxxhash should not be in clang-format list * Add instructions and update memory alloc/free * Update instructions for lz4 * NONJAVACLI-3460: update dependencies (#4706) * update third party dependencies * update lz4 version in the header file * update libraries for the windows build * reverting the version bump in the headers * use the latest version of curl * Update OpenSSL and add CHANGELOG.md * downgade curl version to one available via vcpkg * downgrade zlib to last available version in vcpkg * downgrade zstd to the latest available * Include CPPFLAGS within make for libcurl * Update mklove/modules/configure.libcurl * Update CHANGELOG.md --------- Co-authored-by: Milind L <[email protected]> Co-authored-by: Emanuele Sabellico <[email protected]> * Upgrade linux dependencies (#4875) * Security upgrade for OpenSSL and Curl, CVEs fixed: OpenSSL - CVE-2024-2511 - CVE-2024-4603 - CVE-2024-4741 - CVE-2024-5535 - CVE-2024-6119 CURL - CVE-2024-8096 - CVE-2024-7264 - CVE-2024-6874 - CVE-2024-6197 * Fix for curl configure failure caused by curl/curl#14373 * Include NOTE in CHANGELOG * Update RD_KAFKA_VERSION in rdkafkacpp.h --------- Co-authored-by: Emanuele Sabellico <[email protected]> Co-authored-by: Milind L <[email protected]> Co-authored-by: Jan Werner <[email protected]> Co-authored-by: Milind L <[email protected]>
1 parent e75de5b commit 2f3d0e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2733
-1929
lines changed

.formatignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ src/lz4frame.c
77
src/lz4frame.h
88
src/lz4hc.c
99
src/lz4hc.h
10+
src/rdxxhash.c
11+
src/rdxxhash.h
1012
src/queue.h
1113
src/crc32c.c
1214
src/crc32c.h

.semaphore/semaphore.yml

Lines changed: 37 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ version: v1.0
22
name: 'librdkafka build and release artifact pipeline'
33
agent:
44
machine:
5-
type: s1-prod-macos-arm64
5+
type: s1-prod-macos-13-5-arm64
6+
execution_time_limit:
7+
hours: 3
68
global_job_config:
79
prologue:
810
commands:
@@ -15,7 +17,7 @@ blocks:
1517
task:
1618
agent:
1719
machine:
18-
type: s1-prod-macos-arm64
20+
type: s1-prod-macos-13-5-arm64
1921
env_vars:
2022
- name: ARTIFACT_KEY
2123
value: p-librdkafka__plat-osx__arch-arm64__lnk-all
@@ -41,7 +43,7 @@ blocks:
4143
task:
4244
agent:
4345
machine:
44-
type: s1-prod-macos
46+
type: s1-prod-macos-13-5-amd64
4547
env_vars:
4648
- name: ARTIFACT_KEY
4749
value: p-librdkafka__plat-osx__arch-x64__lnk-all
@@ -108,14 +110,23 @@ blocks:
108110
env_vars:
109111
- name: CFLAGS
110112
value: -std=gnu90 # Test minimum C standard, default in CentOS 7
113+
prologue:
114+
commands:
115+
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
111116
jobs:
117+
- name: 'Build configuration checks'
118+
commands:
119+
- wget -O rapidjson-dev.deb https://launchpad.net/ubuntu/+archive/primary/+files/rapidjson-dev_1.1.0+dfsg2-3_all.deb
120+
- sudo dpkg -i rapidjson-dev.deb
121+
- python3 -m pip install -U pip
122+
- ./packaging/tools/build-configurations-checks.sh
112123
- name: 'Build and integration tests'
113124
commands:
114125
- wget -O rapidjson-dev.deb https://launchpad.net/ubuntu/+archive/primary/+files/rapidjson-dev_1.1.0+dfsg2-3_all.deb
115126
- sudo dpkg -i rapidjson-dev.deb
116127
- python3 -m pip install -U pip
117128
- python3 -m pip -V
118-
- python3 -m pip install -r tests/requirements.txt
129+
- (cd tests && python3 -m pip install -r requirements.txt)
119130
- ./configure --install-deps
120131
# split these up
121132
- ./packaging/tools/rdutcoverage.sh
@@ -140,51 +151,40 @@ blocks:
140151
agent:
141152
machine:
142153
type: s1-prod-ubuntu20-04-amd64-2
154+
prologue:
155+
commands:
156+
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
143157
epilogue:
144158
commands:
145159
- '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/ --destination artifacts/${ARTIFACT_KEY}/'
146160
jobs:
147-
- name: 'Build: centos6 glibc +gssapi'
148-
env_vars:
149-
- name: ARTIFACT_KEY
150-
value: p-librdkafka__plat-linux__dist-centos6__arch-x64__lnk-std__extra-gssapi
151-
commands:
152-
- packaging/tools/build-release-artifacts.sh quay.io/pypa/manylinux2010_x86_64 artifacts/librdkafka.tgz
153-
154-
- name: 'Build: centos6 glibc'
155-
env_vars:
156-
- name: ARTIFACT_KEY
157-
value: p-librdkafka__plat-linux__dist-centos6__arch-x64__lnk-all
158-
commands:
159-
- packaging/tools/build-release-artifacts.sh --disable-gssapi quay.io/pypa/manylinux2010_x86_64 artifacts/librdkafka.tgz
160-
161-
- name: 'Build: centos7 glibc +gssapi'
161+
- name: 'Build: centos8 glibc +gssapi'
162162
env_vars:
163163
- name: ARTIFACT_KEY
164-
value: p-librdkafka__plat-linux__dist-centos7__arch-x64__lnk-std__extra-gssapi
164+
value: p-librdkafka__plat-linux__dist-centos8__arch-x64__lnk-std__extra-gssapi
165165
commands:
166-
- packaging/tools/build-release-artifacts.sh quay.io/pypa/manylinux2014_x86_64 artifacts/librdkafka.tgz
166+
- packaging/tools/build-release-artifacts.sh quay.io/pypa/manylinux_2_28_x86_64:2024.07.01-1 artifacts/librdkafka.tgz
167167

168-
- name: 'Build: centos7 glibc'
168+
- name: 'Build: centos8 glibc'
169169
env_vars:
170170
- name: ARTIFACT_KEY
171-
value: p-librdkafka__plat-linux__dist-centos7__arch-x64__lnk-all
171+
value: p-librdkafka__plat-linux__dist-centos8__arch-x64__lnk-all
172172
commands:
173-
- packaging/tools/build-release-artifacts.sh --disable-gssapi quay.io/pypa/manylinux2014_x86_64 artifacts/librdkafka.tgz
173+
- packaging/tools/build-release-artifacts.sh --disable-gssapi quay.io/pypa/manylinux_2_28_x86_64:2024.07.01-1 artifacts/librdkafka.tgz
174174

175175
- name: 'Build: alpine musl +gssapi'
176176
env_vars:
177177
- name: ARTIFACT_KEY
178178
value: p-librdkafka__plat-linux__dist-alpine__arch-x64__lnk-std__extra-gssapi
179179
commands:
180-
- packaging/tools/build-release-artifacts.sh alpine:3.16 artifacts/librdkafka.tgz
180+
- packaging/tools/build-release-artifacts.sh alpine:3.16.9 artifacts/librdkafka.tgz
181181

182182
- name: 'Build: alpine musl'
183183
env_vars:
184184
- name: ARTIFACT_KEY
185185
value: p-librdkafka__plat-linux__dist-alpine__arch-x64__lnk-all
186186
commands:
187-
- packaging/tools/build-release-artifacts.sh --disable-gssapi alpine:3.16 artifacts/librdkafka.tgz
187+
- packaging/tools/build-release-artifacts.sh --disable-gssapi alpine:3.16.9 artifacts/librdkafka.tgz
188188

189189

190190
- name: 'Linux arm64: release artifact docker builds'
@@ -193,37 +193,40 @@ blocks:
193193
agent:
194194
machine:
195195
type: s1-prod-ubuntu20-04-arm64-1
196+
prologue:
197+
commands:
198+
- '[[ -z $DOCKERHUB_APIKEY ]] || docker login --username $DOCKERHUB_USER --password $DOCKERHUB_APIKEY'
196199
epilogue:
197200
commands:
198201
- '[[ -z $SEMAPHORE_GIT_TAG_NAME ]] || artifact push workflow artifacts/ --destination artifacts/${ARTIFACT_KEY}/'
199202
jobs:
200-
- name: 'Build: centos7 glibc +gssapi'
203+
- name: 'Build: centos8 glibc +gssapi'
201204
env_vars:
202205
- name: ARTIFACT_KEY
203-
value: p-librdkafka__plat-linux__dist-centos7__arch-arm64__lnk-std__extra-gssapi
206+
value: p-librdkafka__plat-linux__dist-centos8__arch-arm64__lnk-std__extra-gssapi
204207
commands:
205-
- packaging/tools/build-release-artifacts.sh quay.io/pypa/manylinux2014_aarch64 artifacts/librdkafka.tgz
208+
- packaging/tools/build-release-artifacts.sh quay.io/pypa/manylinux_2_28_aarch64:2024.07.01-1 artifacts/librdkafka.tgz
206209

207-
- name: 'Build: centos7 glibc'
210+
- name: 'Build: centos8 glibc'
208211
env_vars:
209212
- name: ARTIFACT_KEY
210-
value: p-librdkafka__plat-linux__dist-centos7__arch-arm64__lnk-all
213+
value: p-librdkafka__plat-linux__dist-centos8__arch-arm64__lnk-all
211214
commands:
212-
- packaging/tools/build-release-artifacts.sh --disable-gssapi quay.io/pypa/manylinux2014_aarch64 artifacts/librdkafka.tgz
215+
- packaging/tools/build-release-artifacts.sh --disable-gssapi quay.io/pypa/manylinux_2_28_aarch64:2024.07.01-1 artifacts/librdkafka.tgz
213216

214217
- name: 'Build: alpine musl +gssapi'
215218
env_vars:
216219
- name: ARTIFACT_KEY
217220
value: p-librdkafka__plat-linux__dist-alpine__arch-arm64__lnk-all__extra-gssapi
218221
commands:
219-
- packaging/tools/build-release-artifacts.sh alpine:3.16 artifacts/librdkafka.tgz
222+
- packaging/tools/build-release-artifacts.sh alpine:3.16.9 artifacts/librdkafka.tgz
220223

221224
- name: 'Build: alpine musl'
222225
env_vars:
223226
- name: ARTIFACT_KEY
224227
value: p-librdkafka__plat-linux__dist-alpine__arch-arm64__lnk-all
225228
commands:
226-
- packaging/tools/build-release-artifacts.sh --disable-gssapi alpine:3.16 artifacts/librdkafka.tgz
229+
- packaging/tools/build-release-artifacts.sh --disable-gssapi alpine:3.16.9 artifacts/librdkafka.tgz
227230

228231

229232
- name: 'Windows x64: MinGW-w64'
@@ -239,11 +242,8 @@ blocks:
239242
value: UCRT64
240243
prologue:
241244
commands:
242-
- cache restore msys2-x64-${Env:ARTIFACT_KEY}
243245
# Set up msys2
244246
- "& .\\win32\\setup-msys2.ps1"
245-
- cache delete msys2-x64-${Env:ARTIFACT_KEY}
246-
- cache store msys2-x64-${Env:ARTIFACT_KEY} c:/msys64
247247
epilogue:
248248
commands:
249249
- if ($env:SEMAPHORE_GIT_TAG_NAME -ne "") { artifact push workflow artifacts/ --destination artifacts/$Env:ARTIFACT_KEY/ }
@@ -275,25 +275,13 @@ blocks:
275275
prologue:
276276
commands:
277277
# install vcpkg in the parent directory.
278-
- pwd
279278
- cd ..
280-
# Restore vcpkg caches, if any.
281-
- cache restore vcpkg-archives-$Env:ARTIFACT_KEY
282279
# Setup vcpkg
283280
- "& .\\librdkafka\\win32\\setup-vcpkg.ps1"
284281
- cd librdkafka
285282
- ..\vcpkg\vcpkg integrate install
286283
# Install required packages.
287284
- ..\vcpkg\vcpkg --feature-flags=versions install --triplet $Env:triplet
288-
- cd ..
289-
- pwd
290-
# Store vcpkg caches
291-
- ls vcpkg/
292-
- echo $Env:VCPKG_ROOT
293-
- cache delete vcpkg-archives-$Env:ARTIFACT_KEY
294-
- cache store vcpkg-archives-$Env:ARTIFACT_KEY C:/Users/semaphore/AppData/Local/vcpkg/archives
295-
- pwd
296-
- cd librdkafka
297285
epilogue:
298286
commands:
299287
- Get-ChildItem . -include *.dll -recurse

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
# librdkafka v2.2.1
2+
3+
*Note: given this patch version contains only a single fix, it's suggested to upgrade to latest backward compatible release instead, as it contains all the issued fixes.
4+
Following [semver 2.0](https://semver.org/), all our patch and minor releases are backward compatible and our minor releases may also contain fixes.
5+
Please note that 2.x versions of librdkafka are also backward compatible with 1.x as the major version release was only for the upgrade to OpenSSL 3.x.*
6+
7+
librdkafka v2.2.1 is a maintenance release backporting:
8+
9+
* Fix for idempotent producer fatal errors, triggered after a possibly persisted message state (#4438).
10+
* Update bundled lz4 (used when `./configure --disable-lz4-ext`) to
11+
[v1.9.4](https://github.com/lz4/lz4/releases/tag/v1.9.4), which contains
12+
bugfixes and performance improvements (#4726).
13+
* Upgrade OpenSSL to v3.0.13 (while building from source) with various security fixes,
14+
check the [release notes](https://www.openssl.org/news/cl30.txt)
15+
(@janjwerner-confluent, #4690).
16+
* Upgrade zstd to v1.5.6, zlib to v1.3.1, and curl to v8.8.0 (@janjwerner-confluent, #4690).
17+
* Upgrade Linux dependencies: OpenSSL 3.0.15, CURL 8.10.1 (#4875).
18+
19+
20+
21+
### Idempotent producer fixes
22+
23+
* After a possibly persisted error, such as a disconnection or a timeout, next expected sequence
24+
used to increase, leading to a fatal error if the message wasn't persisted and
25+
the second one in queue failed with an `OUT_OF_ORDER_SEQUENCE_NUMBER`.
26+
The error could contain the message "sequence desynchronization" with
27+
just one possibly persisted error or "rewound sequence number" in case of
28+
multiple errored messages.
29+
Solved by treating the possible persisted message as _not_ persisted,
30+
and expecting a `DUPLICATE_SEQUENCE_NUMBER` error in case it was or
31+
`NO_ERROR` in case it wasn't, in both cases the message will be considered
32+
delivered (#4438).
33+
34+
35+
136
# librdkafka v2.2.0
237

338
librdkafka v2.2.0 is a feature release:

LICENSE.lz4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
src/rdxxhash.[ch] src/lz4*.[ch]: [email protected]:lz4/lz4.git e2827775ee80d2ef985858727575df31fc60f1f3
1+
src/rdxxhash.[ch] src/lz4*.[ch]: [email protected]:lz4/lz4.git 5ff839680134437dbf4678f3d0c7b371d84f4964
22

33
LZ4 Library
4-
Copyright (c) 2011-2016, Yann Collet
4+
Copyright (c) 2011-2020, Yann Collet
55
All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without modification,

LICENSES.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ THE SOFTWARE
141141

142142
LICENSE.lz4
143143
--------------------------------------------------------------
144-
src/rdxxhash.[ch] src/lz4*.[ch]: [email protected]:lz4/lz4.git e2827775ee80d2ef985858727575df31fc60f1f3
144+
src/rdxxhash.[ch] src/lz4*.[ch]: [email protected]:lz4/lz4.git 5ff839680134437dbf4678f3d0c7b371d84f4964
145145

146146
LZ4 Library
147-
Copyright (c) 2011-2016, Yann Collet
147+
Copyright (c) 2011-2020, Yann Collet
148148
All rights reserved.
149149

150150
Redistribution and use in source and binary forms, with or without modification,

configure.self

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mkl_toggle_option "Development" ENABLE_VALGRIND "--enable-valgrind" "Enable in-c
3434

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

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

4040
mkl_toggle_option "Feature" ENABLE_REGEX_EXT "--enable-regex-ext" "Enable external (libc) regex (else use builtin)" "y"

mklove/modules/configure.libcurl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ void foo (void) {
4545
function install_source {
4646
local name=$1
4747
local destdir=$2
48-
local ver=7.86.0
49-
local checksum="3dfdd39ba95e18847965cd3051ea6d22586609d9011d91df7bc5521288987a82"
48+
local ver=8.10.1
49+
local checksum="d15ebab765d793e2e96db090f0e172d127859d78ca6f6391d7eafecfd894bbc0"
5050

5151
echo "### Installing $name $ver from source to $destdir"
5252
if [[ ! -f Makefile ]]; then
@@ -86,8 +86,8 @@ function install_source {
8686
--disable-manual \
8787
--disable-ldap{,s} \
8888
--disable-libcurl-option \
89-
--without-{librtmp,libidn2,winidn,nghttp2,nghttp3,ngtcp2,quiche,brotli} &&
90-
time make -j &&
89+
--without-{librtmp,libidn2,winidn,nghttp2,nghttp3,ngtcp2,quiche,brotli,libpsl} &&
90+
time make CPPFLAGS="$CPPFLAGS" -j &&
9191
make DESTDIR="${destdir}" prefix=/usr install
9292
local ret=$?
9393

mklove/modules/configure.libssl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ function manual_checks {
9191
function libcrypto_install_source {
9292
local name=$1
9393
local destdir=$2
94-
local ver=3.0.8
95-
local checksum="6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e"
94+
local ver=3.0.15
95+
local checksum="23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533"
9696
local url=https://www.openssl.org/source/openssl-${ver}.tar.gz
9797

9898
local conf_args="--prefix=/usr --openssldir=/usr/lib/ssl no-shared no-zlib"

mklove/modules/configure.libzstd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ void foo (void) {
4242
function install_source {
4343
local name=$1
4444
local destdir=$2
45-
local ver=1.5.2
46-
local checksum="7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0"
45+
local ver=1.5.6
46+
local checksum="8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1"
4747

4848
echo "### Installing $name $ver from source to $destdir"
4949
if [[ ! -f Makefile ]]; then

mklove/modules/configure.zlib

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ void foo (void) {
4242
function install_source {
4343
local name=$1
4444
local destdir=$2
45-
local ver=1.2.13
46-
local checksum="b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30"
45+
local ver=1.3.1
46+
local checksum="9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23"
4747

4848
echo "### Installing $name $ver from source to $destdir"
4949
if [[ ! -f Makefile ]]; then

0 commit comments

Comments
 (0)