Skip to content

Conversation

@OlegDokuka
Copy link
Member

@OlegDokuka OlegDokuka commented May 2, 2020

This PR ensures that stream ids are issued in order even under high racing between logical streams in the way of scheduling stream id issuing on the event loop scheduler.

This is done on the level of RSocket because of the incorrect Transport level design and should be considered as a workaround until DuplexConnection will be revised in 1.1

Signed-off-by: Oleh Dokuka [email protected]

@OlegDokuka OlegDokuka requested a review from rstoyanchev May 2, 2020 10:27
@OlegDokuka OlegDokuka added the bug label May 2, 2020
@OlegDokuka OlegDokuka added this to the 1.0 milestone May 2, 2020
@OlegDokuka OlegDokuka linked an issue May 2, 2020 that may be closed by this pull request
@OlegDokuka OlegDokuka force-pushed the bugfix/streamId-order branch from 98bbcd6 to 6a74390 Compare May 2, 2020 12:28
Copy link
Contributor

@rstoyanchev rstoyanchev left a comment

Choose a reason for hiding this comment

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

I'm wondering about the performance impact of putting this on the EventLoop scheduler and also whether serial execution would be enforced across multiple connections with global resources in Reactor Netty?

On other hand why not create Schedulers.single(Schedulers.parallel()) in RSocketRequester and not involve DuplexConnection at all?

@OlegDokuka
Copy link
Member Author

I guess you are right. We can sacrifice a new API method in favor of just solving the problem

@OlegDokuka OlegDokuka force-pushed the bugfix/streamId-order branch from 6a74390 to 7461326 Compare May 4, 2020 08:46
@OlegDokuka OlegDokuka requested a review from rstoyanchev May 4, 2020 08:46
@OlegDokuka
Copy link
Member Author

OlegDokuka commented May 4, 2020

@rstoyanchev fixed. Followed your suggestion to use Scheduler.single(Schedulers.parallel()) Since this is a workaround, a configuration of that should never be public API until one request for that

@OlegDokuka OlegDokuka force-pushed the bugfix/streamId-order branch from 7461326 to dcd413b Compare May 4, 2020 09:17
@OlegDokuka OlegDokuka force-pushed the bugfix/streamId-order branch from dcd413b to de75f44 Compare May 4, 2020 09:44
@OlegDokuka OlegDokuka merged commit 202e27f into develop May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requests may have non-sequential stream ids

3 participants