Skip to content

Commit

Permalink
Comment about excluded -1 value
Browse files Browse the repository at this point in the history
  • Loading branch information
emasab committed Dec 14, 2024
1 parent 8151cfe commit 2fc3a17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rdkafka_topic.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,10 @@ static int rd_kafka_toppar_leader_update(rd_kafka_topic_t *rkt,

rd_kafka_toppar_lock(rktp);

/* -1 (null) is excluded to allow to switch back to a
* leader not supporting KIP-320 still, for example
* during a cluster roll for upgrading brokers to
* a version supporting that KIP. */
if (leader_epoch != -1 && leader_epoch < rktp->rktp_leader_epoch) {
rd_kafka_dbg(rktp->rktp_rkt->rkt_rk, TOPIC, "BROKER",
"%s [%" PRId32
Expand Down

0 comments on commit 2fc3a17

Please sign in to comment.