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

Fallback to fetch v12 (#10) #4806

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fallback to fetch v12 (#10) #4806

wants to merge 1 commit into from

Conversation

anchitj
Copy link
Member

@anchitj anchitj commented Aug 8, 2024

If any toppars have a zero topic id

How to Reproduce

Set inter.broker.protocol.version to 2.4 with 3.7 and fetch would fail always.

If any toppars have a zero topic id
@anchitj anchitj requested a review from a team as a code owner August 8, 2024 08:23
@@ -943,7 +943,21 @@ static void rd_kafka_broker_fetch_reply(rd_kafka_t *rk,
}
}

/**
* @brief Check if any toppars have a non-zero topic id.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change to zero topic id

rkbuf = rd_kafka_buf_new_flexver_request(

/* Fallback to version 12 if topic id is null which can happen if
* inter.broker.protocol.version is old */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change old to <2.8

Copy link
Collaborator

@emasab emasab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! Let's make your changes and my comment and rebase it, then I'm approving

* @brief Check if any toppars have a non-zero topic id.
*
*/
rd_bool_t can_use_topic_id(rd_kafka_broker_t *rkb) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add static, better calling it can_use_topic_ids (as in J)

Suggested change
rd_bool_t can_use_topic_id(rd_kafka_broker_t *rkb) {
static rd_bool_t can_use_topic_ids(rd_kafka_broker_t *rkb) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants