Support for Redis Sentinel#79
Conversation
|
@ctoestreich Thanks for the pull request! I ask that you conform to the existing whitespace convention (4 spaces per indentation) and not reformat the files that you touch. It makes it very difficult to identify what actually changed. |
|
That certainly wasn't intentional. I have updated the previous files to spaces again where applicable. I moved some of the code doc form /* foo/ to //foo so that future IDEs don't try and convert to inline javadoc. |
|
@ctoestreich Thanks for reformatting the pull request! |
|
@gresrun Is the 2.1.0-SNAPSHOT published anywhere in maven land? |
|
No, but I can cut the release now. |
|
Still don't see 2.1.0-SNAPSHOT anywhere in the wild. |
|
@ctoestreich Crap. Sorry. I just released v2.1.0 to Maven Central; will show up in a few hours. |
|
So you can create a config object with sentinal information. How does the WorkerImpl use this? WorkerImpl is created by passing in a Jedis object which is set as final. Shouldn't the WorkerImpl be create with a JedisSentinalPool object and then the Jedis object be created within WorkerImpl by JedisSentinalPool.getResource()? With the current config, if I have a redis sentinel setup and the master node switches to one of the other redis nodes... it may be possible that the current connection that WorkerImpl jedis object has to the redis node goes to readonly mode, which would cause a JedisDataException when trying to write to redis. In this case, if I have a RECONNECT exception fail strategy to try and recover form this exception, how will the Jedis object choose the new master node? The Jedis object is always stuck using the node it was created with .. which in this case, went read only. |
Currently the test for the sentinel is set to ignore. You can manually start up a sentinel and a master redis server and uncomment the @ignore to test.