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: Producer hangs on send pending check with thread producer enabled #270

Merged

Conversation

cbrand
Copy link
Contributor

@cbrand cbrand commented Feb 22, 2022

Description

I discovered during implementation on top of faust that on high volume event consumptions that the whole process pipeline suddenly stopped doing anything. No further kafka messages were processed.

After checking the logic i realized that I enabled PRODUCER_THREADED and that the thread producer is not thread safe when waiting for new messages to come in.

This is fixed in this PR to avoid waiting forever for an event to be set in flush_atmost.
Instead it times out and returns the up until now identified amount of sent messages.

A unit test is added to verify the behavior of this change.

@cbrand cbrand force-pushed the fix/timeout-in-flush-almost branch from 9745c7c to 23a493e Compare February 23, 2022 20:25
@cbrand
Copy link
Contributor Author

cbrand commented Feb 23, 2022

@patkivikram hopefully fixed the formatting issues (i only ran black on the faust repository and not the tests repository accidentally).

@patkivikram patkivikram merged commit 4e32327 into faust-streaming:master Feb 24, 2022
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.

2 participants