-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
3.x: Change Flowable.groupBy to signal MBE instead of possibly hanging #6740
Conversation
Codecov Report
@@ Coverage Diff @@
## 3.x #6740 +/- ##
============================================
- Coverage 98.17% 98.11% -0.06%
+ Complexity 6191 6190 -1
============================================
Files 677 677
Lines 44663 44599 -64
Branches 6171 6152 -19
============================================
- Hits 43847 43760 -87
- Misses 289 301 +12
- Partials 527 538 +11
Continue to review full report at Codecov.
|
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.
Never used that operator and I remember @davidmoten had lots of use cases so let's wait for his approval?
Sure. |
Let's merge this into the release and get feedback from the field. |
This PR changes the backpressure behavior of
Flowable.groupBy
to signalMissingBackpressureException
instead of silently hanging if the produced groups are not ready to be accepted by the downstream.This can happen if one
flatMap
s agroupBy
but there are more groups produced than the concurrency level offlatMap
. Since replenishment is tied to item consumption from the groups, not consuming them can result in none of the groups receiving any further items and the whole operator hangs.The following changes have been applied:
Flowable
, lacking a queue, no longer supports operator fusion. Tests checking this property have been removed as well.pull
,isEmpty
andclear
will trigger replenishment so that other groups can make progress too.Fixes #6641