Proper master failover detection depends on testOnBorrow
This commit is contained in:
@@ -65,6 +65,9 @@ public class JedisSentinelPool extends Pool<Jedis> {
|
||||
public JedisSentinelPool(String masterName, Set<String> sentinels,
|
||||
final GenericObjectPoolConfig poolConfig, int timeout,
|
||||
final String password, final int database) {
|
||||
// Proper master failover detection dependes on testOnBorrow, so force it here
|
||||
poolConfig.setTestOnBorrow(true);
|
||||
|
||||
this.poolConfig = poolConfig;
|
||||
this.timeout = timeout;
|
||||
this.password = password;
|
||||
|
||||
Reference in New Issue
Block a user