Ensure early dispose is delivered to late subscriber#2756
Merged
OlegDokuka merged 3 commits into1.0.xfrom Apr 3, 2023
Merged
Conversation
Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com>
OlegDokuka
commented
Mar 30, 2023
| log.debug(format(channel, "{}: subscribing inbound receiver"), this); | ||
| } | ||
| if (inboundDone && getPending() == 0) { | ||
| if ((inboundDone && getPending() == 0) || isCancelled()) { |
Contributor
Author
There was a problem hiding this comment.
since cancelation is possible when there is a subscriber, in that case isCancelled would mean dispose happened earlier
OlegDokuka
commented
Mar 30, 2023
| volatile int once; | ||
| static final AtomicIntegerFieldUpdater<FluxReceive> ONCE = | ||
| AtomicIntegerFieldUpdater.newUpdater(FluxReceive.class, "once"); | ||
| boolean subscribedOnce; |
Contributor
Author
There was a problem hiding this comment.
simplified that part to be simple bool value since there is no concurrency on that field
Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com>
Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com>
Contributor
Author
|
with that fix I dont see the rsocket test hanging because of an undelivered completion signal on the inbound side) (need that to wait for all bufs to be delivered and consumed) |
violetagg
approved these changes
Apr 3, 2023
OlegDokuka
added a commit
that referenced
this pull request
Apr 3, 2023
Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com>
violetagg
added a commit
that referenced
this pull request
Apr 4, 2023
The test is dropped as it relies that the EmbeddedEventLoop can be accessed by multiple threads. This is not allowed any more in Netty 5 netty/netty#12871
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the issue that appears when late inbound subscriber races with connection dispose