Skip to content

3.x: fix switchMaps inconsistency swallowing errors when cancelled #6572

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

Merged
merged 1 commit into from
Jul 16, 2019

Conversation

akarnokd
Copy link
Member

@akarnokd akarnokd commented Jul 15, 2019

The various switchMap operators did not report any accumulated exceptions to the global error handler when the sequence was cancelled (and thus the errors would never be delivered through the regular channels).

@akarnokd akarnokd added this to the 3.0 milestone Jul 15, 2019
@codecov
Copy link

codecov bot commented Jul 15, 2019

Codecov Report

Merging #6572 into 3.x will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                3.x    #6572      +/-   ##
============================================
+ Coverage     98.17%   98.18%   +<.01%     
- Complexity     6178     6182       +4     
============================================
  Files           678      678              
  Lines         44886    44896      +10     
  Branches       6212     6211       -1     
============================================
+ Hits          44069    44083      +14     
+ Misses          273      272       -1     
+ Partials        544      541       -3
Impacted Files Coverage Δ Complexity Δ
...internal/operators/flowable/FlowableSwitchMap.java 97.65% <100%> (+0.95%) 3 <0> (ø) ⬇️
...rnal/operators/observable/ObservableSwitchMap.java 94.7% <100%> (+0.02%) 3 <0> (ø) ⬇️
...ternal/operators/observable/ObservableFlatMap.java 89.25% <100%> (-1.69%) 3 <0> (ø)
...ternal/operators/mixed/FlowableSwitchMapMaybe.java 100% <100%> (ø) 2 <0> (ø) ⬇️
.../operators/mixed/FlowableSwitchMapCompletable.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...x/internal/operators/flowable/FlowableFlatMap.java 89.94% <100%> (+0.47%) 4 <0> (ø) ⬇️
...rnal/operators/mixed/ObservableSwitchMapMaybe.java 100% <100%> (ø) 3 <0> (ø) ⬇️
...ernal/operators/mixed/FlowableSwitchMapSingle.java 100% <100%> (ø) 2 <0> (ø) ⬇️
...perators/mixed/ObservableSwitchMapCompletable.java 100% <100%> (+1.05%) 3 <0> (ø) ⬇️
...va/io/reactivex/internal/util/AtomicThrowable.java 100% <100%> (ø) 8 <3> (+3) ⬆️
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa8e03f...61a5acd. Read the comment docs.

Copy link
Collaborator

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does 2.x also need a fix?

@akarnokd
Copy link
Member Author

It is certainly an inconsistency and goes against the no-error lost principle introduced via 2.x. It was reported (#6571) in conjunction with 2.x but the changes introduce more places of undeliverable exceptions. I don't know what such change could mean for users of the 2.2.x line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants