-
Notifications
You must be signed in to change notification settings - Fork 183
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
Stop fetching when flow stops #253
Stop fetching when flow stops #253
Conversation
faust/transport/consumer.py
Outdated
# Ignore records fetched while flow was suspended | ||
if coro is suspend_flow: | ||
records = {} | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be continue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason for break is that even if the fetcher has completed (I have seen cases where both happen around the same time) to ignore the result and return nothing
Codecov Report
@@ Coverage Diff @@
## master #253 +/- ##
==========================================
- Coverage 94.26% 94.22% -0.05%
==========================================
Files 100 100
Lines 10814 10834 +20
Branches 1477 1482 +5
==========================================
+ Hits 10194 10208 +14
- Misses 549 553 +4
- Partials 71 73 +2
Continue to review full report at Codecov.
|
await self.sleep(1) | ||
return records, active_partitions | ||
finally: | ||
self.not_waiting_next_records.set() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we want to process the exception?
Description
Changes
consumer._wait_next_records
toconsumer.getmany
to avoid a lock during rebalance