-
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
GroupBy with flatMap and observeOn does not seem to support backpressure in 1.2.x #5029
Comments
It does work correctly with rxjava 2.x Flowable. |
For historical reasons, |
I know ;). But it does not work either :(. If I add maxConcurrent (1 or 2 or 3 etc.) to flatMap after groupBy the behavior stays the same - all 10000 items are requested at once.
|
In RxJava 1.x there is OperatorGroupByTest which tests some backpressure scenarios. |
OperatorGroupBy L247 keeps requesting from upstream and thus consumes it in an unbounded manner. Would you like to work out a fix? |
This is a bug. Fix posted in #5030. |
Looks good. Your fix seems to work :). |
Thanks for verifying the fix. No further action is necessary of you. There are a few pending contributions targeting 1.x but I'll try to release 1.2.6 next Friday. |
Closing via #5030 |
There are a plenty of issues fixing some sorts of backpressure problems in groupBy (e.g. #3428, #3425).
But nevertheless when I try the following code it requests all 10000 values from the source at once without waiting for processing of single items (example running with rxjava 1.2.x):
When running the code I see 10000 "Requested X" messages getting printed immediately and afterwards messages "Processing X" coming after some timeout.
With this behavior it does not seem to be possible to parallelize processing of single groups in rxjava in any useful way when working with large or unlimited sources.
The text was updated successfully, but these errors were encountered: