You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "shivam mitra (JIRA)" <ji...@apache.org> on 2017/10/18 11:25:00 UTC

[jira] [Created] (GEODE-3862) setbit command with redis adaptor kills the server when using WAN replication

shivam mitra created GEODE-3862:
-----------------------------------

             Summary: setbit command with redis adaptor kills the server when using WAN replication
                 Key: GEODE-3862
                 URL: https://issues.apache.org/jira/browse/GEODE-3862
             Project: Geode
          Issue Type: Bug
          Components: redis, wan
            Reporter: shivam mitra
             Fix For: 1.2.1


I have created a WAN cluster with redis adaptor over cache servers. Everything works well except for the setbit command. 
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package test;
import redis.clients.jedis.*;
import redis.clients.jedis.exceptions.JedisException;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import redis.clients.jedis.exceptions.JedisException;

public class Test {

    //address of your redis server
    private static final String redisHost = "redis_ip";
    private static final Integer redisPort = 11211;


    public void addSets() {
        JedisPoolConfig poolConfig = new JedisPoolConfig();
        poolConfig.setMaxIdle(50);
        poolConfig.setMaxTotal(1000);
        poolConfig.setTestOnBorrow(true);
        poolConfig.setTestOnReturn(true);
        JedisPool pool = new JedisPool(poolConfig,redisHost, redisPort);
        Jedis jedis= null;
        String key = "xT|0|BloomFilter";
        long [] bits = {1464236631,12373513,1488983657,1329373495,147236649,1623846793,1194510359,282099785,1758709929,1059647223,416962921,1893573065,924784087,551826057,2028436201}; 
        
        //get a jedis connection jedis connection pool
        try {
            jedis = pool.getResource();
            Pipeline pipeline = jedis.pipelined();

            for (long b : bits) {
                
                pipeline.setbit(key, b, true);
            }
            pipeline.multi();
            pipeline.exec();

        } finally {
            if (jedis != null) {
                jedis.close();
            }
        }
        
    }
    public static void main(String[] args){
        Test main = new Test();
        main.addSets();
        //main.addHash();
    }
}

But the server crashes and I get the following error in java program.
Exception in thread "main" redis.clients.jedis.exceptions.JedisException: Could not return the resource to the pool
	at redis.clients.jedis.JedisPool.returnResource(JedisPool.java:256)
	at redis.clients.jedis.JedisPool.returnResource(JedisPool.java:16)
	at redis.clients.jedis.Jedis.close(Jedis.java:3409)
	at test.Test.addSets(Test.java:47)
	at test.Test.main(Test.java:54)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
	at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:202)
	at redis.clients.util.RedisInputStream.readByte(RedisInputStream.java:40)
	at redis.clients.jedis.Protocol.process(Protocol.java:151)
	at redis.clients.jedis.Protocol.read(Protocol.java:215)
	at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:340)
	at redis.clients.jedis.Connection.getAll(Connection.java:310)
	at redis.clients.jedis.Connection.getAll(Connection.java:302)
	at redis.clients.jedis.Pipeline.sync(Pipeline.java:99)
	at redis.clients.jedis.Pipeline.clear(Pipeline.java:85)
	at redis.clients.jedis.BinaryJedis.resetState(BinaryJedis.java:1781)
	at redis.clients.jedis.JedisPool.returnResource(JedisPool.java:252)
	... 4 more
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
	at java.net.SocketInputStream.read(SocketInputStream.java:171)
	at java.net.SocketInputStream.read(SocketInputStream.java:141)
	at java.net.SocketInputStream.read(SocketInputStream.java:127)
	at redis.clients.util.RedisInputStream.ensureFill(RedisInputStream.java:196)
	... 14 more

I get the following in redis.logs:

[finest 2017/10/18 11:21:40.947 UTC redis <Event Processor for GatewaySender_dc1.3> tid=0x58] SerialGatewaySender queue :dc1.3_SERIAL_GATEWAY_SENDER_QUEUE: Determined tail key: 0

[fine 2017/10/18 11:21:40.947 UTC redis <Event Processor for GatewaySender_dc1.3> tid=0x58] SerialGatewaySender queue :dc1.3_SERIAL_GATEWAY_SENDER_QUEUE: Peeked 0->null

[finest 2017/10/18 11:21:40.947 UTC redis <Event Processor for GatewaySender_dc1.3> tid=0x58] SerialGatewaySender queue :dc1.3_SERIAL_GATEWAY_SENDER_QUEUE: Peek current time: 1508325700947

[finest 2017/10/18 11:21:40.947 UTC redis <Event Processor for GatewaySender_dc1.3> tid=0x58] SerialGatewaySender queue :dc1.3_SERIAL_GATEWAY_SENDER_QUEUE: Peek continuing

[finest 2017/10/18 11:21:37.041 UTC redis <GeodeRedisServer-WorkerThread-1> tid=0x5e] virtualPut invoked for event EntryEventImpl[op=UPDATE;region=/ReDiS_StRiNgS;key=xT|0|BloomFilter;oldValue=null;newValue=    





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)