-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Separate partition queues no longer working in v1.6.0 #3231
Comments
Are you checking the error return of rd_kafka_assign()? its error enforcement has been improved. |
Ah, sorry, I simplified a bit too much. The call to |
I also assume that the assignment must be taking effect, right, because we do manage to get a message after the call to |
Ok, I think I see the issue.
So it seems like now after every assignment, existing partition queues are destroyed and new ones are created in their place? And these new queues do not maintain the forwarding of the original queues. |
Ok, so this turned out to be easy enough to work around. Now after every call to I don't have enough context to say whether librdkafka's new behavior is right or wrong, but it is most definitely different! Would be great if the documentation could be updated accordingly if you plan to stick with the new behavior. Roughly speaking, I think every call to |
Great analysis, @benesch ! Would you like to submit a PR to update the docstring for the relevant rd_kafka_queue.. functions and rd_kafka_assign*() for this behaviour? |
Apologies, but I'm spinning down my involvement with rdkafka and I won't have the time! |
Description
We're seeing test failures in Materialize with librdkafka v1.6.0 that weren't present in v1.5.3 regarding split partition queues. Basically, we want n different queues to poll given a topic with n partitions. So we create a consumer, assign it to the partitions we want, then call something like:
The code is in Rust and goes through the rust-rdkafka wrapper, so the reality is more complicated.
The problem is that the queue forwarding does not seem to take effect, at least not immediately. The next call to
rd_kafka_poll(rdk)
on the main consumer, which we expect to serve only callbacks and not return any messages, will return a message from the queue we just forwarded!How to reproduce
The failing dependency bump PR is here, if it's of interest: MaterializeInc/materialize#5478
I don't have a nice tight reproduction at the moment, but I did manage to bisect the problem down to e4c24e9. The title of that commit is "Rewrote assignment handling and move it out of the cgrp", so definitely seems related.
Checklist
IMPORTANT: We will close issues where the checklist has not been completed.
Please provide the following information:
v1.6.0
2.5.x
Ubuntu 18.04
debug=..
as necessary) from librdkafkaThe text was updated successfully, but these errors were encountered: