Skip to content

Enable adaptive refresh by default #3249

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

Open
tishun opened this issue Apr 7, 2025 · 0 comments
Open

Enable adaptive refresh by default #3249

tishun opened this issue Apr 7, 2025 · 0 comments
Labels
type: breaking Breaking change
Milestone

Comments

@tishun
Copy link
Collaborator

tishun commented Apr 7, 2025

Feature Request

Is your feature request related to a problem? Please describe

Currently, when creating clustered connections, the adaptive refresh feature is disabled by default.
I've not seen any comments on why this was chosen, but since then almost all examples of usages of Lettuce seem show that adaptive refresh is always enabled by users. It is recommended in default connection settings provided by cloud providers (such as Azure, Google, AWS, Alibaba etc.) and Redis documentation for production usage alike.

Some of the other Redis clients provide adaptive refresh by default and our users have commented that they also expected the same from the Lettuce driver

Describe the solution you'd like

Adaptive refresh was introduced with #240 some 9 years ago.
Changing the defaults would be a breaking change so we should target a major release for that.

We should:

  • enable all adaptive refresh triggers by default
  • provide a way for the user to easily disable them or only enable some
  • mark the enableAllAdaptiveRefreshTriggers() as deprecated to be removed in future releases

Describe alternatives you've considered

Documenting this and increasing visibility.

The problem is that we are still running into clients that are not aware of this feature and are having frequent issues during topology change events.

Teachability, Documentation, Adoption, Migration Strategy

Existing users that depend on this feature being disabled would have to manually disable it.

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

No branches or pull requests

1 participant