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

Fix timeout for rd_kafka_query_watermark_offsets #4460

Merged
merged 6 commits into from
Oct 11, 2023

Conversation

milindl
Copy link
Contributor

@milindl milindl commented Oct 10, 2023

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
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! Just some test changes to ensure it's run when the test run has the local flag

tests/0031-get_offsets.c Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
src/rdkafka.c Show resolved Hide resolved
@milindl milindl requested a review from emasab October 11, 2023 05:18
@milindl
Copy link
Contributor Author

milindl commented Oct 11, 2023

Addressed comments, thanks for review @emasab

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 @milindl !

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