spring-projects / spring-projects/spring-data-redis

Configuration builder should offer a way to configure the current state [DATAREDIS-1131]

Open
#1,699 1 comment 1 reaction 1 assignee View on GitHub

@christophstrobl is already working on this.

Since Dec 30, 2020.

type: enhancement
Dominant language
Java
Stars
1.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Mark Paluch opened DATAREDIS-1131 and commented

This is a follow-up of spring-projects/spring-boot#15630

As part of this issue, Spring Boot alters the ClusterTopologyRefreshOptions that's part of the ClientOptions. Spring Boot also provides a LettuceClientConfigurationBuilderCustomizer with the ability to tune the configuration.

The problem with this approach is that LettuceClientConfigurationBuilder.clientOptions() let me set a new ClientOptions, erasing anything else that was previously configured. I considered adding an extra customizer for options but this feels to me that's something Lettuce should handle directly.

Describe the solution you'd like

Another approach could be callback style where we'd keep the builder rather than the result options and let users customize it, something like:

 

builder.clientOptions((options) -> options.socketOptions((socket) -> socket.tcpNoDelay(false)));

The call above would keep any customization as is as only the tcpNoDelay property of the socket options would change.

Describe alternatives you've considered

An alternative to this is to get the ClientOptions (by building the configuration) and then reinitializing a ClientOptions.Builder based on an instance.

 

Originally reported by Stéphane Nicoll


No further details from DATAREDIS-1131

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.