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

Add an option to ignore cluster init error #3455

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

sazzad16
Copy link
Collaborator

@sazzad16 sazzad16 commented Jun 3, 2023

References of inspiration:


A JedisClusterOperationException with message Could not initialize cluster slots cache. is thrown during failed cluster initialization. This behavior is introduced since Jedis 4.0.0. To avoid this error, just set jedis.cluster.initNoError (any value) system property.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (70f7ea8) 71.31% compared to head (fd54290) 71.32%.

❗ Current head fd54290 differs from pull request most recent head dc1cc67. Consider uploading reports for the commit dc1cc67 to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3455      +/-   ##
============================================
+ Coverage     71.31%   71.32%   +0.01%     
  Complexity     4743     4743              
============================================
  Files           275      275              
  Lines         14740    14742       +2     
  Branches        993      994       +1     
============================================
+ Hits          10512    10515       +3     
+ Misses         3798     3796       -2     
- Partials        430      431       +1     
Impacted Files Coverage Δ
...nts/jedis/providers/ClusterConnectionProvider.java 80.00% <100.00%> (+0.63%) ⬆️

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@yangbodong22011
Copy link
Collaborator

yangbodong22011 commented Jun 3, 2023

I don't particularly want to add INIT_NO_ERROR_PROPERTY , unless we wait for more user feedback. Although it is harmless, we should not continue to be compatible with this erroneous behavior.

@sazzad16
Copy link
Collaborator Author

sazzad16 commented Jun 3, 2023

@yangbodong22011 It seems to be a big deal for spring-data-redis (check references), at least for some of the users.

@yangbodong22011
Copy link
Collaborator

It's really not easy to deal with, let's hear @kableprime opinion on this PR.

@chayim
Copy link
Contributor

chayim commented Jun 5, 2023

I agree with @yangbodong22011 that we shouldn't have to handle this. Let's let it bake for a bit... It sounds like fixing this library do to an issue there - ideally the fix would be in the downstream library. But as this is optional, for users who require it, voting with @sazzad16

But I think we should document this.

@sazzad16 sazzad16 added this to the 5.0.0 milestone Jun 5, 2023
@sazzad16 sazzad16 merged commit 5c6b87b into redis:master Jun 5, 2023
@sazzad16 sazzad16 deleted the cluster-init-no-error branch June 5, 2023 11:30
@sazzad16
Copy link
Collaborator Author

sazzad16 commented Jun 5, 2023

@chayim I'm thinking here https://github.com/redis/jedis/wiki/FAQ. WDYT?

@sazzad16 sazzad16 modified the milestones: 5.0.0, 4.4.x Jun 5, 2023
@fzheng2022
Copy link

The init error is suppressed by the option. But will it work normally afterwards? what is meaning by "failed cluster initialization". My use case: All tries had the error while the Cluster seems up and stable.

@sazzad16
Copy link
Collaborator Author

@fzheng2022

The init error is suppressed by the option.

To be exact, the init error can be suppressed by the option.

will it work normally afterwards?

No.

what is meaning by "failed cluster initialization".

(Mostly) Not being able to connect to any of the nodes and fetch cluster information.

@sazzad16 sazzad16 modified the milestones: 4.4.x, 4.4.2 Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants