-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Race condition in JedisSentinelPool.initPool() causes JedisConnectionException on getResource() #1910
Milestone
Comments
mp911de
added a commit
to spring-projects/spring-data-redis
that referenced
this issue
Dec 6, 2018
It seems like a race condition between the main thread running the Constructor and then initPool() and the sentinel listeners threads are also trying to call initPool() in parallel |
#1566 it seems like this fix is the source of this bug |
gkorland
added a commit
that referenced
this issue
Dec 25, 2018
fix #1910 protect initPool from being called in parallel
gkorland
added a commit
that referenced
this issue
Dec 25, 2018
mp911de
added a commit
to spring-projects/spring-data-redis
that referenced
this issue
Jan 7, 2019
snicoll
pushed a commit
to snicoll/jedis
that referenced
this issue
Mar 5, 2019
gkorland
added a commit
that referenced
this issue
Mar 5, 2019
Backport of gh-1910 to fix race condition
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JedisSentinelPool.initPool() is called concurrently by multiple threads during statup: The thread creating
JedisSentinelPool
andMasterListener
. The consequence is that calls togetResource()
fail with an exception.Reproduction of the issue requires just the right timing so calling the offending code in a
while(true)
loop allows reproduction instead of single-shot execution.Jedis version: 3.0.0
Reproducer
The text was updated successfully, but these errors were encountered: