Skip to content

Fix a Many sink / EmitterProcessor subscriber disposal leak#3029

Merged
simonbasle merged 1 commit into3.4.xfrom
3028-emitterProcessorRemoveLeak
Apr 21, 2022
Merged

Fix a Many sink / EmitterProcessor subscriber disposal leak#3029
simonbasle merged 1 commit into3.4.xfrom
3028-emitterProcessorRemoveLeak

Conversation

@simonbasle
Copy link
Copy Markdown
Contributor

The EmitterProcessor#remove method causes retaining of subscribers if
the removal is done in parallel, as the CAS failure doesn't cause a
new loop iteration.

This applies to direct instantiations of EmitterProcessor as well as
Sinks.many().onBackpressureBuffer sinks.

This commit fixes the method to loop back when the CAS fails.

Fixes #3028.

The EmitterProcessor#remove method causes retaining of subscribers if
the removal is done in parallel, as the CAS failure doesn't cause a
new loop iteration.

This applies to direct instantiations of EmitterProcessor as well as
Sinks.many().onBackpressureBuffer sinks.

This commit fixes the method to loop back when the CAS fails.

Fixes #3028.
@simonbasle simonbasle requested a review from a team as a code owner April 21, 2022 09:37
@simonbasle simonbasle added this to the 3.5.0-M2 milestone Apr 21, 2022
@simonbasle simonbasle added the type/bug A general bug label Apr 21, 2022
@simonbasle simonbasle self-assigned this Apr 21, 2022
@simonbasle simonbasle modified the milestones: 3.5.0-M2, 3.4.18 Apr 21, 2022
@simonbasle simonbasle merged commit adaec72 into 3.4.x Apr 21, 2022
@simonbasle simonbasle deleted the 3028-emitterProcessorRemoveLeak branch April 21, 2022 10:09
@reactorbot
Copy link
Copy Markdown

@simonbasle this PR seems to have been merged on a maintenance branch, please ensure the change is merge-forwarded to intermediate maintenance branches and up to main 🙇

simonbasle added a commit that referenced this pull request Apr 21, 2022
@simonbasle simonbasle modified the milestones: 3.4.18, 3.5.0-M2 Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants