首页 > Redis并发连接时经常出现异常

Redis并发连接时经常出现异常

public T getResult() {
            T result = null;
            try {
                result = execute();
            } catch (Exception e) {
                //throw new RuntimeException("Redis execute exception", e);
                result = null;
                this.shardedJedisPool.returnBrokenResource(jedis);
            } finally {
                if (jedis != null) {
                    this.shardedJedisPool.returnResource(jedis);
                }
            }
            return result;
        }

如果出现异常这块已经进行了处理 但是在get redis服务器上的key值时 有时(偶尔)会得到 PONG 和 时间戳数字 这时程序就会从受到影响导致一些数据不正确 百思不得其解 不知道有人碰到过类似的问题吗

【热门文章】
【热门文章】