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

StreamConsumer not waking #665

Open
trtt opened this issue Mar 30, 2024 · 1 comment
Open

StreamConsumer not waking #665

trtt opened this issue Mar 30, 2024 · 1 comment

Comments

@trtt
Copy link

trtt commented Mar 30, 2024

This StreamConsumer racy behavior can be observed in the recent release, probably after the move to Event-based API.
Some of the events (stats, logs etc.) are processed internally and are consumed by the poll returning None. Since librdkafka only wakes the queue when it transitions from empty -> non-empty, waker might be not called at any point in the future in this case.

Event order example:

  1. new message event
  2. new stats event
  3. poll processes stats and returns None
  4. StreamConsumer sets up waker and returns Poll::Pending
  5. waker is never called by librdkafka since the queue never went empty

Probably connected issue: #638

@trtt
Copy link
Author

trtt commented Mar 30, 2024

I sketched out a potential solution to the problem: #666

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

No branches or pull requests

1 participant