Skip to content

Conversation

@nonbinaryprogrammer
Copy link
Contributor

@nonbinaryprogrammer nonbinaryprogrammer commented Jul 28, 2021

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 build run 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.

@nonbinaryprogrammer nonbinaryprogrammer added the redis Issues related to the geode-for-redis module label Jul 28, 2021
Copy link
Contributor

@ringles ringles left a 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>
@nonbinaryprogrammer nonbinaryprogrammer force-pushed the GEODE-9169-remove-netty-context-switch branch from 4f949e3 to 9e52708 Compare August 11, 2021 22:39
@nonbinaryprogrammer nonbinaryprogrammer marked this pull request as ready for review August 11, 2021 22:40
new ExecutionHandlerContext(socketChannel, regionProvider, pubsub,
allowUnsupportedSupplier, shutdownInvoker, redisStats, backgroundExecutor,
redisPasswordBytes, getPort(), member));
allowUnsupportedSupplier, shutdownInvoker, redisStats, redisPasswordBytes,
Copy link
Contributor

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.

Copy link
Contributor Author

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);
Copy link
Contributor

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);
Copy link
Contributor

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);
Copy link
Contributor

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

@nonbinaryprogrammer nonbinaryprogrammer merged commit ed38145 into apache:develop Aug 18, 2021
@nonbinaryprogrammer nonbinaryprogrammer deleted the GEODE-9169-remove-netty-context-switch branch August 18, 2021 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

redis Issues related to the geode-for-redis module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants