Skip to content

Add configuration to disable Redis Cluster dynamic sources refresh #22571

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

Closed
wants to merge 2 commits into from
Closed

Add configuration to disable Redis Cluster dynamic sources refresh #22571

wants to merge 2 commits into from

Conversation

onobc
Copy link
Contributor

@onobc onobc commented Jul 26, 2020

This commit adds an option to enable/disable the DynamicRefreshSources setting on the Lettuce cluster toplogy refresh options.

Closes gh-22398

This commit adds an option to enable/disable the DynamicRefreshSources setting on the Lettuce cluster toplogy refresh options.

Closes gh-22398
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 26, 2020
Copy link
Member

@snicoll snicoll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I've added a couple comments.

@@ -410,6 +410,13 @@ public Refresh getRefresh() {
*/
private boolean adaptive;

/**
* Whether discovered nodes should be used as the source for the cluster
* topology. When set to {@literal false}, only the initial seed nodes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't use Javadoc tag here as the annotation processor don't handle them.

* topology. When set to {@literal false}, only the initial seed nodes
* will be used as sources for topology discovery.
*/
private Boolean dynamicSources = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The null initialization here is unnecessary. The AP will figure out the right default for a wrapper type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought so but I noticed it explicitly specified in places like this. I will remove the redundant initialization.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Jul 27, 2020
@snicoll snicoll added type: enhancement A general enhancement and removed status: waiting-for-feedback We need additional information before we can continue status: waiting-for-triage An issue we've not yet triaged labels Aug 4, 2020
@snicoll snicoll self-assigned this Aug 4, 2020
@snicoll snicoll added this to the 2.4.0-M2 milestone Aug 4, 2020
snicoll pushed a commit that referenced this pull request Aug 4, 2020
This commit adds an option to enable/disable the DynamicRefreshSources
setting on the Lettuce cluster toplogy refresh options.

See gh-22571
@snicoll snicoll closed this in a8130da Aug 4, 2020
@snicoll
Copy link
Member

snicoll commented Aug 4, 2020

Thanks again Chris. I've decided to switch the Boolean property a primitive as we can easily test that our default does not deviate from the default in Lettuce. See 903dc93 for more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lettuce: Add configuration to disable Redis Cluster dynamic sources refresh
3 participants