[ 
https://issues.apache.org/jira/browse/GEODE-8333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17164514#comment-17164514
 ] 

ASF GitHub Bot commented on GEODE-8333:
---------------------------------------

ringles commented on a change in pull request #5349:
URL: https://github.com/apache/geode/pull/5349#discussion_r460149939



##########
File path: 
geode-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java
##########
@@ -191,38 +199,121 @@ public void channelInactive(ChannelHandlerContext ctx) {
     ctx.close();
   }
 
-  private void executeCommand(ChannelHandlerContext ctx, Command command) {
-    RedisResponse response;
-
-    if (!isAuthenticated()) {
-      response = handleUnAuthenticatedCommand(command);
-      writeToChannel(response);
-      return;
+  private void startAsyncCommandExecution(Command command) {
+    if (logger.isDebugEnabled()) {
+      logger.debug("Starting execution of async Redis command: {}", command);
     }
+    final long start = redisStats.startCommand(command.getCommandType());
+    command.setAsyncStartTime(start);
+    command.execute(this);
+  }
 
-    if (command.isUnsupported() && !allowUnsupportedCommands()) {
-      writeToChannel(
-          RedisResponse.error(command.getCommandType() + 
RedisConstants.ERROR_UNSUPPORTED_COMMAND));
-      return;
+  public void endAsyncCommandExecution(Command command, ByteBuf response) {
+    synchronized (commandQueue) {
+      Command head = takeFromCommandQueue();
+      if (head != command) {
+        throw new IllegalStateException(
+            "expected " + command + " but found " + head + " in the queue");

Review comment:
       Is there a test for this exception?




----------------------------------------------------------------
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:
[email protected]


> Fix PUBSUB hang
> ---------------
>
>                 Key: GEODE-8333
>                 URL: https://issues.apache.org/jira/browse/GEODE-8333
>             Project: Geode
>          Issue Type: Bug
>          Components: redis
>            Reporter: Sarah Abbey
>            Priority: Major
>
> PUBSUB hangs with concurrent publishers and subscribers on multiple servers



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to