Skip to content

Fix timeout for rd_kafka_query_watermark_offsets#4460

Merged
Emanuele Sabellico (emasab) merged 6 commits intomasterfrom
dev_fix_query_watermark_offsets_timeout
Oct 11, 2023
Merged

Fix timeout for rd_kafka_query_watermark_offsets#4460
Emanuele Sabellico (emasab) merged 6 commits intomasterfrom
dev_fix_query_watermark_offsets_timeout

Conversation

@milindl
Copy link
Copy Markdown
Contributor

rd_kafka_query_watermark_offsets hangs forever if say, the broker is down, and exceeds the timeout in case the RTT > timeout, see the linked issue.

This PR adds a failing test, and then fixes the issue.

This also changes the fact the return value of rd_kafka_q_serve was being compared to RD_KAFKA_OP_RES_YIELD, which doesn't make sense to me, since it returns the count of served ops, and RD_KAFKA_OP_RES_YIELD is a positive constant.

Fixes #2588.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the fix! Just some test changes to ensure it's run when the test run has the local flag

Comment thread tests/0031-get_offsets.c Outdated
Comment thread CHANGELOG.md Outdated
Comment thread src/rdkafka.c
@milindl
Copy link
Copy Markdown
Contributor Author

Addressed comments, thanks for review Emanuele Sabellico (@emasab)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

rd_kafka_query_watermark_offsets API hang forever

2 participants