Describe the bug
If you attempt to read the last entry of an empty stream using XREAD STREAMS blah +
, you get an error. It should be returning nil instead.
To reproduce
127.0.0.1:6379> xgroup create blah blah 0 MKSTREAM
OK
127.0.0.1:6379> xread STREAMS blah +
(error) ERR the stream last element ID is 0-0
Expected behavior
Valkey should return a nil response instead of an error, as with Redis:
127.0.0.1:6379> xgroup create blah blah 0 MKSTREAM
OK
127.0.0.1:6379> xread STREAMS blah +
(nil)
127.0.0.1:6379>
Additional information
This happens use the latest valkey/valkey:alpine
image.
The source indicates this error should be impossible.