Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout settings not applied to sentinel connection #1487

Closed
bernard-xl opened this issue Mar 17, 2017 · 4 comments
Closed

Timeout settings not applied to sentinel connection #1487

bernard-xl opened this issue Mar 17, 2017 · 4 comments

Comments

@bernard-xl
Copy link

Expected behavior

The connectionTimeout and soTimeout arguments in JedisSentinelPool constructor are applicable to all connections (connection to Sentinels, and Master).

Actual behavior

The connection timeout of Sentinel connection is 2000 ms regardless of connectionTimeout and soTimeout value. Is this purposely designed or a bug?

Steps to reproduce:

  1. Prepare non-routable address for timeout simulation, e.g. 10.0.0.0:26379
  2. Set the connection timeout to 10000 ms
  3. new JedisSentinelPool(masterName, nonRoutable, config, connectionTimeout)
  4. Observe the actual timeout, it will happen after 2000 ms instead of 10000 ms

Redis / Jedis Configuration

Jedis version: 2.7.2

Redis version: 3.2.4

Java version: 1.8.0

@bernard-xl bernard-xl changed the title Timeout settings didn't applied to sentinel connection Timeout settings not applied to sentinel connection Mar 17, 2017
bernard-xl pushed a commit to bernard-xl/jedis that referenced this issue Mar 17, 2017
@marcosnils
Copy link
Contributor

@HeartSaVioR ^?

@sazzad16
Copy link
Collaborator

@bernard-xl To clarify, except for host:post, nothing is used for sentinels even password. All the constructor parameters are assumed for master only.

If we ought to care, we should also (and specially) think about password which is stated in #1636

@pavel-hp
Copy link

pavel-hp commented Feb 2, 2018

+1

sazzad16 pushed a commit that referenced this issue Nov 26, 2019
…1943)

This commit attempts to solve #1487 and #1636.

This PR adds a constructor to JedisSentinelPool to configure a Sentinel connection with respective timeout settings and a password. Supporting constructors have also been added to BinaryJedis and Jedis classes.
@sazzad16
Copy link
Collaborator

Resolved by #1943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants