From 25685eeec631715a9a08c8dcc96ef3c93eff98ee Mon Sep 17 00:00:00 2001 From: Emanuele Sabellico Date: Mon, 24 Apr 2023 13:33:25 +0200 Subject: [PATCH 1/2] Fix set_leader_epoch (#4266) - 'leader_epoch_' variable is assigned to itself. Co-authored-by: Pave Pimenov --- src-cpp/rdkafkacpp_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-cpp/rdkafkacpp_int.h b/src-cpp/rdkafkacpp_int.h index bc024ebe90..6a836d7e59 100644 --- a/src-cpp/rdkafkacpp_int.h +++ b/src-cpp/rdkafkacpp_int.h @@ -1289,7 +1289,7 @@ class TopicPartitionImpl : public TopicPartition { } void set_leader_epoch(int32_t leader_epoch) { - leader_epoch_ = leader_epoch_; + leader_epoch_ = leader_epoch; } std::ostream &operator<<(std::ostream &ostrm) const { From a47e0d6106c0d9886211be3d0c355dcdf63c64ef Mon Sep 17 00:00:00 2001 From: Emanuele Sabellico Date: Mon, 24 Apr 2023 17:06:50 +0200 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 328f45a245..cc96d32ac9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ librdkafka v2.1.1 is a maintenance release: pkg-config `Requires.private` field (@FantasqueX, @stertingen, #4180). * Fixes certain cases where polling would not keep the consumer in the group or make it rejoin it (#4256). + * Fix to the C++ set_leader_epoch method of TopicPartitionImpl, + that wasn't storing the passed value (@pavel-pimenov, #4267). ## Fixes