jinghong
jinghong
## please see my test program package testshard; import java.util.ArrayList; import java.util.List; import org.apache.commons.pool.impl.GenericObjectPool.Config; import redis.clients.jedis.JedisShardInfo; import redis.clients.jedis.ShardedJedis; import redis.clients.jedis.ShardedJedisPool; public class TestShard { public static String[] ss = {"acs:user:jdjsak","acs:user:473892","acs:user:jd832","acs:user:kids88","acs:user:kjekKmmjmdj","acs:user:eiiw","acs:user:9mkkdk","acs:user:kkid","acs:user:wkdsl22"};...
I found the problem appears when using MD5 hashing algorithm, java.lang.ArrayIndexOutOfBoundsException happens, when using Hashing.MURMUR_HASH, all is OK.
construct pool like this pool = new ShardedJedisPool(config, shards); will lead the problem. pool = new ShardedJedisPool(config, shards, Hashing.MURMUR_HASH); is OK.