Skip to content

Conversation

@sazzad16
Copy link
Contributor

@sazzad16 sazzad16 commented Mar 29, 2021

Original PR #2358 (by @walles)

Johan Walles and others added 30 commits January 25, 2021 09:11
No behavior changes, just a refactoring.

Changes:
* Replaces recursion with a for loop
* Extract redirection handling into its own method
* Extract connection-failed handling into its own method

Note that `tryWithRandomNode` is gone, it was never `true` so it and its
code didn't survive the refactoring.
Inspired by redis#1334 where this went real easy :).

Would have made redis#2355 shorter.

Free public updates for JDK 7 ended in 2015:
<https://en.wikipedia.org/wiki/Java_version_history>

For JDK 8, free public support is available from non-Orace vendors until
at least 2026 according to the same table.

And JDK 8 is what Jedis is being tested on anyway:
<https://github.com/redis/jedis/blob/ac0969315655180c09b8139c16bded09c068d498/.circleci/config.yml#L67-L74>
* consider connection exceptions and disregard random nodes

* reset redirection
This reverts commit 67a062a.

Lots of tests in JedisClusterCommandTests started failing, need to be
fixed before trying again.
1. We try to contact master => JedisConnectionException
2. We try to contact replica => It refers us to master, hasn't failed over yet
3. We try to contact master => JedisConnectionException
4. We try to contact replica => Success, because it has now failed over
Consider connection exceptions and disregard random nodes
Co-authored-by: Jens Green Olander <[email protected]>
Source (all of these point to the same place):
* walles/retries-split
* 4f80d73
* redis#2355
gkorland
gkorland previously approved these changes Mar 30, 2021
 Conflicts:
	src/main/java/redis/clients/jedis/BinaryJedisCluster.java
	src/main/java/redis/clients/jedis/JedisCluster.java
@sazzad16 sazzad16 dismissed stale reviews from gkorland and yangbodong22011 via 4501b0d March 31, 2021 01:55
@sazzad16 sazzad16 closed this Mar 31, 2021
@sazzad16 sazzad16 deleted the walles-backoff branch March 31, 2021 02:03
@sazzad16 sazzad16 removed this from the 3.6.0 milestone Mar 31, 2021
@sazzad16
Copy link
Contributor Author

Everything pushed to the original PR #2358

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

Successfully merging this pull request may close these issues.

4 participants