-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Introducing periodic topology mechanism for JedisCluster (#3596) #3604
base: 4.x
Are you sure you want to change the base?
Introducing periodic topology mechanism for JedisCluster (#3596) #3604
Conversation
The main changes in this PR are as follows: 1. Add `topologyRefreshEnabled` and `topologyRefreshPeriod` to control the periodic topology refresh mechanism. 2. `topologyRefreshExecutor` is a single-threaded executor responsible for running `TopologyRefreshTask`. 3. Add `checkClusterSlotSequence` to check whether the cluster slots returned by the server are consecutive and there are no duplicates. 4. [Test] In JedisClusterTestBase, `CLUSTER RESET SOFT` was changed to `HARD`, because SOFT cannot clean up the Redis Cluster configuration and may cause a crash. Please refer to redis/redis#12701 5. [Test] Adjust the cluster-node-timeout in the Makefile to 15s, consistent with the default configuration of Redis. --------- * Introducing periodic topology mechanism for JedisCluster * Apply suggestions from sazzad16 Co-authored-by: M Sazzadul Hoque <[email protected]> * Remove topologyRefreshEnabled * Apply suggestions from sazzad16 Co-authored-by: M Sazzadul Hoque <[email protected]> * remove save topologyRefreshPeriod * Move INIT_NO_ERROR_PROPERTY to JedisCluster * add timeout for clusterPeriodTopologyRefreshTest * Update src/main/java/redis/clients/jedis/DefaultJedisSocketFactory.java Co-authored-by: M Sazzadul Hoque <[email protected]> --------- Co-authored-by: M Sazzadul Hoque <[email protected]>
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## 4.x #3604 +/- ##
============================================
+ Coverage 67.37% 67.42% +0.04%
- Complexity 4785 4798 +13
============================================
Files 272 272
Lines 15421 15467 +46
Branches 981 991 +10
============================================
+ Hits 10390 10428 +38
- Misses 4603 4607 +4
- Partials 428 432 +4 ☔ View full report in Codecov by Sentry. |
@sazzad16 when can this be released ? thanks for the feature @yangbodong22011 :) <3 |
@aarengee |
backport #3596 to 4.x