Skip to content

Cannot set config value to empty string using Lettuce #2798

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
marcusdacoregio opened this issue Dec 8, 2023 · 1 comment
Closed

Cannot set config value to empty string using Lettuce #2798

marcusdacoregio opened this issue Dec 8, 2023 · 1 comment
Assignees
Labels
in: lettuce Lettuce driver type: bug A general bug

Comments

@marcusdacoregio
Copy link

The Redis documentation says (emphasis by me):

Notifications are enabled using the notify-keyspace-events of redis.conf or via the CONFIG SET.
Setting the parameter to the empty string disables notifications.

However, when I try to do:

connection.serverCommands().setConfig("notify-keyspace-events", "").then()

An error is thrown:

Caused by: java.lang.IllegalArgumentException: Value must not be null or empty
	at org.springframework.util.Assert.hasText(Assert.java:240)
	at org.springframework.data.redis.connection.lettuce.LettuceReactiveServerCommands.setConfig(LettuceReactiveServerCommands.java:133)

Is this expected?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 8, 2023
@mp911de mp911de added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 8, 2023
@mp911de mp911de self-assigned this Dec 8, 2023
@mp911de
Copy link
Member

mp911de commented Dec 8, 2023

Thanks for the report. This is indeed a bug on our side with the Lettuce driver. The Jedis implementation handles this already properly.

@mp911de mp911de changed the title Cannot set notify-keyspace-events to empty string Cannot set config value to empty string using Lettuce Dec 8, 2023
@mp911de mp911de added the in: lettuce Lettuce driver label Dec 8, 2023
@mp911de mp911de closed this as completed in bcf761f Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: lettuce Lettuce driver type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants