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

In high concurrency call stringRedisTemplate fails #3117

Open
DaPeng-Zong opened this issue Jan 2, 2025 · 3 comments
Open

In high concurrency call stringRedisTemplate fails #3117

DaPeng-Zong opened this issue Jan 2, 2025 · 3 comments

Comments

@DaPeng-Zong
Copy link

DaPeng-Zong commented Jan 2, 2025

Bug Report

First of all: Have you checked the docs https://github.com/lettuce-io/lettuce-core/wiki, GitHub issues, or Stack Overflow whether someone else has already reported your issue?

In high concurrency call stringRedisTemplate. OpsForSet () members (Product_Source_Resource_ApplicationId + deviceKey); Always appear abnormal, when I want to check whether the key is first call stringRedisTemplate. HasKey (key) and there will be a new exception

Current Behavior

A clear and concise description of the behavior.

See https://stackoverflow.com/help/minimal-reproducible-example for details of what a good minimum reproducible example is

Stack trace
// your stack trace here;

Caused by: java.lang.UnsupportedOperationException
	at java.util.AbstractCollection.add(AbstractCollection.java:262) ~[?:1.8.0_202]
	at io.lettuce.core.output.ValueSetOutput.set(ValueSetOutput.java:48) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:810) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.handleBytes(RedisStateMachine.java:572) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine$State$Type.handle(RedisStateMachine.java:206) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.doDecode(RedisStateMachine.java:334) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.decode(RedisStateMachine.java:295) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:841) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode0(CommandHandler.java:792) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:766) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:658) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:598) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:792) ~[netty-all-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:475) ~[netty-all-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[netty-all-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.50.Final.jar:4.1.50.Final]

This is the first exception*****************************************************************


This is the second exception******************************************************************
org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.UnsupportedOperationException: io.lettuce.core.output.ValueOutput does not support set(long)
	at org.springframework.data.redis.FallbackExceptionTranslationStrategy.getFallback(FallbackExceptionTranslationStrategy.java:53) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:43) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:273) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.convertLettuceAccessException(LettuceStringCommands.java:799) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.lettuce.LettuceStringCommands.get(LettuceStringCommands.java:68) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.DefaultedRedisConnection.get(DefaultedRedisConnection.java:266) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.DefaultStringRedisConnection.get(DefaultStringRedisConnection.java:408) ~[rule-common-1.3.0-STANDARD-ITERATION-SNAPSHOT.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.DefaultValueOperations$1.inRedis(DefaultValueOperations.java:57) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:60) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:228) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:188) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:53) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at cn.cuiot.dmp.common.utils.RedisUtils.get(RedisUtils.java:107) ~[rule-common-1.3.0-STANDARD-ITERATION-SNAPSHOT.jar:1.3.0-STANDARD-ITERATION-SNAPSHOT]
	at cn.cuiot.dmp.rawdataforward.service.impl.NetworkWarnServiceImpl.processNetworkWarn(NetworkWarnServiceImpl.java:113) ~[rule-engine-consumer-0.2-SNAPSHOT.jar:0.2-SNAPSHOT]
	at cn.cuiot.dmp.rawdataforward.async.impl.AsyncSendServiceImpl.processNetworkWarn(AsyncSendServiceImpl.java:55) ~[rule-engine-consumer-0.2-SNAPSHOT.jar:0.2-SNAPSHOT]
	at sun.reflect.GeneratedMethodAccessor213.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_202]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_202]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) ~[spring-aop-5.2.7.RELEASE.jar:5.2.7.RELEASE]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_202]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_202]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_202]
	at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_202]
Caused by: java.lang.UnsupportedOperationException: io.lettuce.core.output.ValueOutput does not support set(long)
	at io.lettuce.core.output.CommandOutput.set(CommandOutput.java:107) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:778) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.handleInteger(RedisStateMachine.java:404) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine$State$Type.handle(RedisStateMachine.java:206) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.doDecode(RedisStateMachine.java:334) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.RedisStateMachine.decode(RedisStateMachine.java:295) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:841) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode0(CommandHandler.java:792) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:766) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:658) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:598) ~[lettuce-core-6.1.5.RELEASE.jar:6.1.5.RELEASE]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:792) ~[netty-all-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:475) ~[netty-all-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) ~[netty-all-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.50.Final.jar:4.1.50.Final]
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.50.Final.jar:4.1.50.Final]
	... 1 more
2024-12-30 17:18:07.197 [WARN ] [http-common-service-372] [] [AbstractDroolJob.java:58] - drools rule engine deal message error
java.lang.RuntimeException: drools.ruleservice.Rule_forward_1_7001072999631Eval0Invoker@61350043 : org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.NullPointerException
	at org.drools.core.rule.EvalCondition.isAllowed(EvalCondition.java:128) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.phreak.PhreakEvalNode.doLeftInserts(PhreakEvalNode.java:75) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.phreak.PhreakEvalNode.doNode(PhreakEvalNode.java:59) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:390) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:342) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:178) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:136) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:235) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:91) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:33) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:869) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:816) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:808) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1343) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1334) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1318) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:282) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	at cn.cuiot.dmp.rawdataforward.drools.service.AbstractDroolJob.executeForwardRuleMessage(AbstractDroolJob.java:53) ~[rule-engine-consumer-0.2-SNAPSHOT.jar:0.2-SNAPSHOT]
	at cn.cuiot.dmp.rawdataforward.kafka.NotThroughFlinkKafkaConsumerAttribute.lambda$null$0(NotThroughFlinkKafkaConsumerAttribute.java:70) ~[rule-engine-consumer-0.2-SNAPSHOT.jar:0.2-SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_202]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_202]
	at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_202]
Caused by: org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.NullPointerException
	at org.springframework.data.redis.FallbackExceptionTranslationStrategy.getFallback(FallbackExceptionTranslationStrategy.java:53) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:43) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:273) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.lettuce.LettuceKeyCommands.convertLettuceAccessException(LettuceKeyCommands.java:809) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.lettuce.LettuceKeyCommands.exists(LettuceKeyCommands.java:77) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.DefaultedRedisConnection.exists(DefaultedRedisConnection.java:68) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.connection.DefaultStringRedisConnection.exists(DefaultStringRedisConnection.java:345) ~[rule-common-1.3.0-STANDARD-ITERATION-SNAPSHOT.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.RedisTemplate.lambda$hasKey$6(RedisTemplate.java:773) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:228) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:188) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at org.springframework.data.redis.core.RedisTemplate.hasKey(RedisTemplate.java:773) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]
	at cn.cuiot.dmp.rawdataforward.drools.method.RuleMethod.validateApplicationId(RuleMethod.java:370) ~[rule-engine-consumer-0.2-SNAPSHOT.jar:0.2-SNAPSHOT]
	at drools.ruleservice.Rule_forward_1_7001072999631.eval0(Rule_forward_1_7001072999631.java:8) ~[?:?]
	at drools.ruleservice.Rule_forward_1_7001072999631Eval0InvokerGenerated_7.evaluate(Unknown Source) ~[?:?]
	at drools.ruleservice.Rule_forward_1_7001072999631Eval0Invoker.evaluate(Unknown Source) ~[?:?]
	at org.drools.core.rule.EvalCondition.isAllowed(EvalCondition.java:123) ~[drools-core-7.59.0.Final.jar:7.59.0.Final]
	... 22 more

Expected behavior/code

A clear and concise description of what you expected to happen (or code).

Environment

e.g.

  • Lettuce version(s): [e.g. 5.0.0.RELEASE, 4.2.2.Final]
  • Redis version: [e.g. 4.0.9]
@tishun
Copy link
Collaborator

tishun commented Jan 2, 2025

Hey @DaPeng-Zong ,

not sure how I can help here. What code causes this issue? Is it reproducible? Can we have a minimal reproducible example where we can see the problem manifest?

By the way there is a template for filing new bugs, have you considered filling it up?

@tishun
Copy link
Collaborator

tishun commented Jan 2, 2025

By the way, as per #2175 the ValueOutput does not support set(long) issue might be caused when an internal issue happens in the driver, and I see a NullPointerException before that, but we are missing the full stack trace as it says

Caused by: org.springframework.data.redis.RedisSystemException: Unknown redis exception; nested exception is java.lang.NullPointerException
...
... 22 more

and we are missing the actual cause (that might point us to the NPE that might have caused all the other exceptions

@tishun tishun changed the title In high concurrency call stringRedisTemplate. OpsForSet () members (Product_Source_Resource_ApplicationId + deviceKey); Always appear abnormal, when I want to check whether the key is first call stringRedisTemplate. HasKey (key) and there will be a new exception In high concurrency call stringRedisTemplate fails Jan 2, 2025
@mp911de
Copy link
Collaborator

mp911de commented Jan 7, 2025

FWIW, out of sync issues have been observed in OOM scenarios:

The above problem may occur after a period of time after the occurrence of OOM

via spring-projects/spring-data-redis#3077 (comment)

I wonder whether CommandHandler.exceptionCaught(…) should terminate its connection and complete commands exceptionally once it has seen a java.lang.Error. Maybe this could help in addressing out of sync errors.

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

3 participants