Change scheduler for reactor executor#17842
Merged
srnagar merged 2 commits intoAzure:masterfrom Dec 9, 2020
Merged
Conversation
srnagar
commented
Nov 27, 2020
sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorExecutor.java
Show resolved
Hide resolved
sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorExecutor.java
Show resolved
Hide resolved
...core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java
Show resolved
Hide resolved
Contributor
|
We should run live test, just to see impact of this change. |
alzimmermsft
reviewed
Dec 1, 2020
...core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java
Show resolved
Hide resolved
conniey
reviewed
Dec 2, 2020
...core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java
Show resolved
Hide resolved
conniey
approved these changes
Dec 7, 2020
conniey
approved these changes
Dec 9, 2020
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 is to change the scheduler on which the reactor executor runs. Previously, it was using
Scheduler.single()which uses a single thread for the entire process. As more connections are created, all the connections will rely on this single thread to perform service operations which limits the scalability of the number of connections that can be created within a process. The change in this PR is to have a dedicated thread,Schedulers.newSingle(), for each connection which will still keep the underlying proton-j reactor thread-safe while allowing the number of connections to scale.Fixes #17843
Fixes #17844