You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2020/08/26 20:17:10 UTC

[geode] branch develop updated: GEODE-8459: Redis API for Geode handles errors when member disconnects (#5481)

This is an automated email from the ASF dual-hosted git repository.

jensdeppe pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git


The following commit(s) were added to refs/heads/develop by this push:
     new cecf003  GEODE-8459: Redis API for Geode handles errors when member disconnects (#5481)
cecf003 is described below

commit cecf0035be9ea02b8ff66749f61ce93c026646ca
Author: Sarah Abbey <41...@users.noreply.github.com>
AuthorDate: Wed Aug 26 16:16:27 2020 -0400

    GEODE-8459: Redis API for Geode handles errors when member disconnects (#5481)
---
 .../geode/redis/internal/netty/ExecutionHandlerContext.java       | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/geode-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java b/geode-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java
index 9eb06ed..e3f5546 100644
--- a/geode-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java
+++ b/geode-redis/src/main/java/org/apache/geode/redis/internal/netty/ExecutionHandlerContext.java
@@ -31,9 +31,11 @@ import io.netty.channel.EventLoopGroup;
 import io.netty.handler.codec.DecoderException;
 import org.apache.logging.log4j.Logger;
 
+import org.apache.geode.ForcedDisconnectException;
 import org.apache.geode.cache.CacheClosedException;
 import org.apache.geode.cache.execute.FunctionException;
 import org.apache.geode.cache.execute.FunctionInvocationTargetException;
+import org.apache.geode.distributed.DistributedSystemDisconnectedException;
 import org.apache.geode.logging.internal.log4j.api.LogService;
 import org.apache.geode.redis.internal.GeodeRedisServer;
 import org.apache.geode.redis.internal.ParameterRequirements.RedisParametersMismatchException;
@@ -167,8 +169,10 @@ public class ExecutionHandlerContext extends ChannelInboundHandlerAdapter {
     } else if (cause instanceof IllegalStateException
         || cause instanceof RedisParametersMismatchException) {
       response = RedisResponse.error(cause.getMessage());
-    } else if (cause instanceof FunctionInvocationTargetException) {
-      // This indicates a member departed
+    } else if (cause instanceof FunctionInvocationTargetException
+        || cause instanceof DistributedSystemDisconnectedException
+        || cause instanceof ForcedDisconnectException) {
+      // This indicates a member departed or got disconnected
       logger.warn(
           "Closing client connection because one of the servers doing this operation departed.");
       channelInactive(ctx);