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
1.x: groupBy with evicting map factory fix #5868
Comments
Yeah, too bad it is marked stable in 1.x. Did somebody run into a signature problem? Deprecation but it should remain operational. Also I'd call the new method |
Nope, I ran into a logic problem (that I created) while reviewing the old code for transfer to the new code. In short the operator uses the map to lookup an evicted GroupedObservable by key but if it has been evicted then you can't get the GroupedObservable to complete. I haven't looked closely at this yet and am not sure how the old tests were working but I'll report back on this. The new 2.x method uses a map that is contracted to report evictions by value, not key. I imported the new 2.x tests into 1.x and two failed on 1.x till I applied the 2.x technique.
Deal. I'll deprecate and make sure the existing method doesn't do anything nasty (possible memory leak by not completing an evicted GroupedObservable) and I lean towards |
…add groupByEvicting method (ReactiveX#5868)
…add new groupBy evicting overload (ReactiveX#5868)
…add new groupBy evicting overload (ReactiveX#5868)
…add new groupBy evicting overload (ReactiveX#5868)
* 1.x: fix bug and deprecate groupBy overload with evictingMapFactory, add new groupBy evicting overload (#5868) * groupBy, do a null check on g because cancel(K) could have cleared the map
Closing via #5917. |
I'm preparing a PR to fix a bug with the operator
groupBy
where an evicting map factory is specified.The problem with the operator extends as far as the method signature. This is what it is now:
This is what it should be (the only change is
Action1<K>
becomesAction1<Object>
:and the javadoc will be changed to indicate that the value from the map should be passed to the
Action1
and not the key.This is a breaking change. How do we want this to happen?
I've got a few options:
groupByV2
DontCallMeException
and addgroupByV2
groupByV2
Any ideas/preferences? I'm ready to go with the PR but just need to decide the change in the API.
The text was updated successfully, but these errors were encountered: