Skip to content
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

Provide onDiscard support in UnicastProcessor #2102

Merged
merged 1 commit into from
Apr 6, 2020

Conversation

OlegDokuka
Copy link
Contributor

@OlegDokuka OlegDokuka commented Apr 5, 2020

This PR ensures that when UnicastProcessor is canceled all the elements are safely discarded so no leaks are going to appear

Signed-off-by: Oleh Dokuka shadowgun@i.ua

@OlegDokuka OlegDokuka marked this pull request as ready for review April 5, 2020 17:38
Signed-off-by: Oleh Dokuka <shadowgun@i.ua>
@codecov-io
Copy link

codecov-io commented Apr 5, 2020

Codecov Report

Merging #2102 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2102      +/-   ##
============================================
+ Coverage     81.96%   82.02%   +0.05%     
  Complexity     4091     4091              
============================================
  Files           380      380              
  Lines         31247    31246       -1     
  Branches       5800     5799       -1     
============================================
+ Hits          25612    25628      +16     
+ Misses         4061     4052       -9     
+ Partials       1574     1566       -8     
Impacted Files Coverage Δ Complexity Δ
.../java/reactor/core/publisher/UnicastProcessor.java 87.07% <100.00%> (-0.08%) 67.00 <1.00> (-1.00)
...eactor/core/publisher/ParallelMergeSequential.java 84.97% <0.00%> (-0.52%) 7.00% <0.00%> (ø%)
.../main/java/reactor/core/publisher/FluxFlatMap.java 94.95% <0.00%> (-0.19%) 19.00% <0.00%> (ø%)
...c/main/java/reactor/core/publisher/FluxReplay.java 84.83% <0.00%> (+0.14%) 29.00% <0.00%> (ø%)
...ain/java/reactor/core/publisher/FluxConcatMap.java 90.55% <0.00%> (+0.27%) 7.00% <0.00%> (ø%)
...rc/main/java/reactor/core/publisher/Operators.java 81.09% <0.00%> (+0.52%) 136.00% <0.00%> (ø%)
...c/main/java/reactor/core/publisher/MonoCreate.java 74.24% <0.00%> (+0.75%) 3.00% <0.00%> (ø%)
...eactor/core/publisher/FluxSubscribeOnCallable.java 73.33% <0.00%> (+0.83%) 3.00% <0.00%> (ø%)
.../java/reactor/util/concurrent/MpscLinkedQueue.java 89.47% <0.00%> (+1.31%) 18.00% <0.00%> (+1.00%)
...ava/reactor/core/publisher/FluxWindowBoundary.java 81.60% <0.00%> (+1.72%) 2.00% <0.00%> (ø%)
... and 2 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 e63dc71...ddc0270. Read the comment docs.

@OlegDokuka OlegDokuka changed the title Provides support for Queue elements discard on termination Provides support for UnicastProcessor to discard elements of it's Queue on termination Apr 6, 2020
@simonbasle simonbasle added area/doOnDiscard This belongs to the doOnDiscard theme type/enhancement A general enhancement labels Apr 6, 2020
@simonbasle simonbasle added this to the 3.3.5.RELEASE milestone Apr 6, 2020
@simonbasle simonbasle changed the title Provides support for UnicastProcessor to discard elements of it's Queue on termination Provide onDiscard support in UnicastProcessor Apr 6, 2020
@simonbasle simonbasle merged commit 7b55b6e into reactor:master Apr 6, 2020
@simonbasle
Copy link
Member

@OlegDokuka this one should actually be backported in 3.2.x 😨

simonbasle added a commit that referenced this pull request Apr 22, 2020
simonbasle added a commit that referenced this pull request Apr 22, 2020
simonbasle added a commit that referenced this pull request Apr 22, 2020
Conflicts in UnicastProcessor are due to the backport of #2102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/doOnDiscard This belongs to the doOnDiscard theme type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants