Skip to content

Commit

Permalink
Fix set_leader_epoch (#4267)
Browse files Browse the repository at this point in the history
'leader_epoch_' variable is assigned to itself.

Co-authored-by: Pave Pimenov <pavel.pimenov@gmail.com>
  • Loading branch information
emasab and pavel-pimenov authored Apr 24, 2023
1 parent 3fa4f4f commit ffb8cd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src-cpp/rdkafkacpp_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ffb8cd1

Please sign in to comment.