-
Notifications
You must be signed in to change notification settings - Fork 695
GEODE-9169: remove netty context switch #6725
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
GEODE-9169: remove netty context switch #6725
Conversation
ringles
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good!
Instead of submitting commands to a background executor, this removes that context switch and performs the command right on the netty thread. Removing the context switch provides a significant performance improvement. Signed-off-by: Donal Evans <doevans@vmware.com>
4f949e3 to
9e52708
Compare
| new ExecutionHandlerContext(socketChannel, regionProvider, pubsub, | ||
| allowUnsupportedSupplier, shutdownInvoker, redisStats, backgroundExecutor, | ||
| redisPasswordBytes, getPort(), member)); | ||
| allowUnsupportedSupplier, shutdownInvoker, redisStats, redisPasswordBytes, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The backgroundExecutor removed here should also be removed from the constructor and can then also be removed from GeodeRedisServer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
| regionProvider, pubSub, | ||
| this::allowUnsupportedCommands, this::shutdown, port, bindAddress, redisStats, | ||
| redisCommandExecutor, member); | ||
| member); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This executor can be completely removed from the class now.
| regionProvider, pubSub, | ||
| this::allowUnsupportedCommands, this::shutdown, port, bindAddress, redisStats, | ||
| redisCommandExecutor, member); | ||
| member); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't the redisCommandExecutor field be removed from this class?
| } | ||
|
|
||
| commandQueue.clear(); | ||
| commandQueue.offer(TERMINATE_COMMAND); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like TERMINATE_COMMAND is no longer used. This class creates in a private static final so I think that static should also be removed
Thank you for submitting a contribution to Apache Geode.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
For all changes:
Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?
Has your PR been rebased against the latest commit within the target branch (typically
develop)?Is your initial contribution a single, squashed commit?
Does
gradlew buildrun cleanly?Have you written or updated unit tests to verify your changes?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
Note:
Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.