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

Additional request around notify-keyspace-events to support Spring Data #3708

Open
danielloader opened this issue Sep 14, 2024 · 5 comments
Open

Comments

@danielloader
Copy link

danielloader commented Sep 14, 2024

Is your feature request related to a problem? Please describe.
Spring Data Redis repository likes to set config values and when it can't it bombs out on start.

spring-projects/spring-data-redis#2670

Caused by: io.lettuce.core.RedisCommandExecutionException: ERR Unknown option or number of arguments for CONFIG SET - 'notify-keyspace-events'
    at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147) ~[lettuce-core-6.3.2.RELEASE.jar!/:6.3.2.RELEASE/8941aea]
    at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116) ~[lettuce-core-6.3.2.RELEASE.jar!/:6.3.2.RELEASE/8941aea]
    at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120) ~[lettuce-core-6.3.2.RELEASE.jar!/:6.3.2.RELEASE/8941aea]
    at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111) ~[lettuce-core-6.3.2.RELEASE.jar!/:6.3.2.RELEASE/8941aea]
    at io.lettuce.core.protocol.CommandWrapper.complete(CommandWrapper.java:63) ~[lettuce-core-6.3.2.RELEASE.jar!/:6.3.2.RELEASE/8941aea]
    at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:745) ~[lettuce-core-6.3.2.RELEASE.jar!/:6.3.2.RELEASE/8941aea]
    at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:680) ~[lettuce-core-6.3.2.RELEASE.jar!/:6.3.2.RELEASE/8941aea]
    at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:597) ~[lettuce-core-6.3.2.RELEASE.jar!/:6.3.2.RELEASE/8941aea]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994) ~[netty-common-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.110.Final.jar!/:4.1.110.Final]
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.110.Final.jar!/:4.1.110.Final]
    at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]

I'm trying to use Redis (and in this case DragonflyDB) as a shared session store for a high availability SpringBoot based application.

Describe the solution you'd like
I'd like to be able to use Spring Data Redis with DragonflyDB.

Describe alternatives you've considered
Keep using Redis sentinel and become increasingly despondent with the experience in EKS.

Additional context

Related to #1657

https://www.shinyproxy.io/documentation/configuration/#session-persistence-and-aws-elasticache - upstream configuration details for elasticache that disables this by default so explicit configuration is needed there.

Using DragonflyDB 1.22.1 via the Operator with 3 replicas.

@adiholden
Copy link
Collaborator

Hi @danielloader
I am closing as we already have open issue for supporting keyspace notifications
#3618

@romange
Copy link
Collaborator

romange commented Sep 16, 2024

@adiholden I think the issue here is different. We currently allow enabling the notifications only via a flag, and the issue here is about enabling it via "config set"

@romange romange reopened this Sep 16, 2024
@danielloader
Copy link
Author

danielloader commented Sep 16, 2024

If the functionality works via a flag I can always follow the same guide as AWS elasticache and enable that out of band in the cache side.

That said yes the original ask was that spring data just works without additional hurdles.

Edit: What's the flag configuration to enable it?

@dranikpg
Copy link
Contributor

Same as with redis: notify-keyspace-events. Please note we only support Ex option

@danielloader
Copy link
Author

Thanks, yeah in which case without EA I guess how I get it configured is a bit premature then.

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

No branches or pull requests

4 participants