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 bug where the timeout in the admin APIs wasn't taken into account. #653
Conversation
Is there a reason we need to pass a full second interval into the librdkafka poll functions? If we do need to keep it rounding like that i would prefer that we just explicitly only take seconds rather than milliseconds, but I don't see the reason why we can't allow timeouts to be provided in milliseconds. The polling timeout can = the timeout provided, or an interval of it so x number of polls yields the full timeout if we need it to happen more granularly than a second but also want to do work between invocations of the poll. |
I agree however I didn't want to change the prototype of the functions since people might already be passing milliseconds timeout (even though it's not really working) which would suddenly become seconds.
I guess that's where people who know the codebase might help. If you could advise me on that I could make the appropriate change. Thanks. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I think I just ran into this issue. What's being awaited for this to be merged? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
In some edge cases, fixed |
Thanks, @benjaminroux! |
The timeout_ms parameter for the admin APIs wasn't being used anywhere.
With that change, the parameter is now used to determine how many times we are going to poll for the given event.
I didn't change the polling timeout (1000ms) so I had to make a decision to round down to the second (i.e. 1800ms would be rounded down to 1sec) and also overriding any value < 1000 to 1000.
Since that parameter wasn't being used yet, another solution would be to change the granularity from ms to sec in the function (timeout_sec instead of timeout_ms). This would prevent the rounding down and the minimum value tricks.