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

Fix a Many sink / EmitterProcessor subscriber disposal leak #3029

Merged
merged 1 commit into from Apr 21, 2022

Conversation

simonbasle
Copy link
Member

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

@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.

None yet

3 participants