You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2020/06/11 00:54:19 UTC

[GitHub] [geode] dschneider-pivotal opened a new pull request #5237: cleaned up ExecutionHandlerContext dependencies

dschneider-pivotal opened a new pull request #5237:
URL: https://github.com/apache/geode/pull/5237


   also the ShutdownExecutor now implements the shutdown command
   instead of it being embedded in the ExecutionHandlerContext
   
   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](http://www.apache.org/legal/resolved.html#category-a)?
   
   ### 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.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] jdeppe-pivotal commented on a change in pull request #5237: cleaned up ExecutionHandlerContext dependencies

Posted by GitBox <gi...@apache.org>.
jdeppe-pivotal commented on a change in pull request #5237:
URL: https://github.com/apache/geode/pull/5237#discussion_r438999736



##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java
##########
@@ -264,7 +238,7 @@ private void moveSubscribeToNewEventLoopGroup(ChannelHandlerContext ctx, Command
     if (command.isOfType(SUBSCRIBE)) {
       CountDownLatch latch = new CountDownLatch(0);
       ctx.channel().deregister().addListener((ChannelFutureListener) future -> {
-        subscriberEventLoopGroup.register(ctx.channel()).sync();
+        server.getSubscriberGroup().register(ctx.channel()).sync();

Review comment:
       I wonder if there is some 'feature-envy' creep happening here. What do you think about pushing the registration functionality onto the `server`? I'm also fine with this approach.

##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java
##########
@@ -264,7 +238,7 @@ private void moveSubscribeToNewEventLoopGroup(ChannelHandlerContext ctx, Command
     if (command.isOfType(SUBSCRIBE)) {
       CountDownLatch latch = new CountDownLatch(0);

Review comment:
       This looks like a bug in that the latch should be initialized with `1`. This is my bug :(.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dschneider-pivotal merged pull request #5237: GEODE-8268: clean up ExecutionHandlerContext

Posted by GitBox <gi...@apache.org>.
dschneider-pivotal merged pull request #5237:
URL: https://github.com/apache/geode/pull/5237


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [geode] dschneider-pivotal commented on a change in pull request #5237: cleaned up ExecutionHandlerContext dependencies

Posted by GitBox <gi...@apache.org>.
dschneider-pivotal commented on a change in pull request #5237:
URL: https://github.com/apache/geode/pull/5237#discussion_r439030672



##########
File path: geode-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java
##########
@@ -264,7 +238,7 @@ private void moveSubscribeToNewEventLoopGroup(ChannelHandlerContext ctx, Command
     if (command.isOfType(SUBSCRIBE)) {
       CountDownLatch latch = new CountDownLatch(0);
       ctx.channel().deregister().addListener((ChannelFutureListener) future -> {
-        subscriberEventLoopGroup.register(ctx.channel()).sync();
+        server.getSubscriberGroup().register(ctx.channel()).sync();

Review comment:
       What I would like to see here is that this code (moveSubscribeToNewEventLoopGroup) to the SubscribeExecutor. Is that possible? I don't really understand what this is about and maybe it is important to do it after the executor has completed.
   I'd also like to see all the netty specific code get moved out of GeodeRedisServer into something like NettyServer in our netty package just to have all the interactions with netty be in that one package. So then this code would interact with the NettyServer for this registration. But then this code would need to get access to the NettyServer (probably from the GeodeRedisServer). If we could break this class's dependency on GeodeRedisServer that might be a good thing but for now we need the GeodeRedisServer anyway (I think so we can ask it to shutdown and if unsupported commands are allowed).




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org