We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I try to read pending messages via XREADGROUP I get the following NullPointerException.
It occurs when a pending message is already deleted from the stream due to its size limit.
The issue is related to the Redis behavior described in this comment https://github.com/redis/redis/blob/5.0.2/src/t_stream.c#L1031.
Also, Python client faced the same issue the previous year redis/redis-py#1116
java.lang.NullPointerException: null at io.lettuce.core.codec.ByteArrayCodec.getBytes(ByteArrayCodec.java:84) at io.lettuce.core.codec.ByteArrayCodec.decodeKey(ByteArrayCodec.java:59) at io.lettuce.core.codec.ByteArrayCodec.decodeKey(ByteArrayCodec.java:28) at io.lettuce.core.output.StreamReadOutput.set(StreamReadOutput.java:73) at io.lettuce.core.protocol.RedisStateMachine.safeSet(RedisStateMachine.java:810) at io.lettuce.core.protocol.RedisStateMachine.handleNull(RedisStateMachine.java:392) at io.lettuce.core.protocol.RedisStateMachine$State$Type.handle(RedisStateMachine.java:206) at io.lettuce.core.protocol.RedisStateMachine.doDecode(RedisStateMachine.java:334) at io.lettuce.core.protocol.RedisStateMachine.decode(RedisStateMachine.java:295) at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:799) at io.lettuce.core.protocol.CommandHandler.decode0(CommandHandler.java:750) at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:733) at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:618) at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:560) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:834)
No NPE.
Also, I use ByteArrayCodec for keys & values.
ByteArrayCodec
The text was updated successfully, but these errors were encountered:
Fix StreamReadOutput when XREADGROUP doesn't report the body #1474
a616521
We now correctly decode stream messages that are deleted (i.e. don't return the body).
48aef37
39cb373
Thanks a lot for letting us know. That's fixed and backported now.
Sorry, something went wrong.
No branches or pull requests
Bug Report
When I try to read pending messages via XREADGROUP I get the following NullPointerException.
It occurs when a pending message is already deleted from the stream due to its size limit.
The issue is related to the Redis behavior described in this comment https://github.com/redis/redis/blob/5.0.2/src/t_stream.c#L1031.
Also, Python client faced the same issue the previous year redis/redis-py#1116
Current Behavior
Stack trace
Expected behavior/code
No NPE.
Environment
Also, I use
ByteArrayCodec
for keys & values.The text was updated successfully, but these errors were encountered: