redis自增报错

Blade 未结 1 26

一、该问题的重现步骤是什么?

Long redisValue = .opsForValue().increment(redisKeydelta)


这一行报错,无法自增获取流水号


也重写了RedisTemplate序列化方式


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

blade-boot, jdk17

四、请提供详细的错误堆栈信息,这很重要。

Caused by: io.lettuce.core.RedisCommandExecutionException: ERR value is not an integer or out of range

at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:147)

at io.lettuce.core.internal.ExceptionFactory.createExecutionException(ExceptionFactory.java:116)

at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:120)

at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:111)

at io.lettuce.core.protocol.CommandWrapper.complete(CommandWrapper.java:63)

at io.lettuce.core.protocol.CommandHandler.complete(CommandHandler.java:745)

at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:680)

at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:597)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1407)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:918)

at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)

at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)

at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)

at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

... 1 more


1条回答
提交回复