Closed josh-hook closed 1 year ago
Please correct me if you think this behavior is wrong 😄
Thanks for your issue! I will have a look soon, if no-one beats me to it :)
That sounds logical. Would you mind making a PR? It's fine if it isn't perfect :)
On Thu, Sep 22, 2022 at 01:51:14AM -0700, Joshua Hook wrote:
Thanks! I'll have a look soon (busy today)
Hi, I found an issue using the XREAD command when passing in
$
as the ID. I'm using versionv2.20.0
.I think this is because in the MiniRedis server it's performing the
xread
callback periodically and each time getting the last ID if the original XREAD command contained$
. Instead I think it should be getting the last ID in the initial command and then re-using that instead of$
for futurexread
polls.For example this will never return anything:
Because when we add the new item to the stream, in MiniRedis it's then using the newest item ID in the next poll to
xread
.Easiest fix looks like in
cmd_stream.go
it should fetch IDs before the blocking call:Please correct me if you think this behavior is wrong 😄