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

Merged
merged 2 commits into from
Sep 24, 2024
Merged

Fallback to fetch v12 (#10) #4806

merged 2 commits into from
Sep 24, 2024

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
Contributor

@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
Contributor

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) {

@confluent-cla-assistant
Copy link

🎉 All Contributor License Agreements have been signed. Ready to merge.
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copy link
Contributor

@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.

LGTM Thanks Anchit

@emasab emasab merged commit 7f63d82 into master Sep 24, 2024
3 checks passed
@emasab emasab deleted the dev_fix_fetch_fallback branch September 24, 2024 14:12
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