summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2018-11-19 17:00:30 +0100
committerantirez <antirez@gmail.com>2018-11-20 08:32:47 +0100
commit45123169bc72653d8641c236219add6616484c33 (patch)
tree61ff32d0376e5cf9169110e7ac21a5e492d44593
parent5ad588f0f4869b486f5dd9f856f7cd991f227512 (diff)
downloadredis-45123169bc72653d8641c236219add6616484c33.tar.gz
Stream: fix XREADGROUP history reading of deleted messages.
This commit fixes #5570. It is a similar bug to one fixed a few weeks ago and is due to the range API to be called with NULL as "end ID" parameter instead of repeating again the start ID, to be sure that we selectively issue the entry with a given ID, or we get zero returned (and we know we should emit a NULL reply).
-rw-r--r--src/t_stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/t_stream.c b/src/t_stream.c
index 95d783e93..768203696 100644
--- a/src/t_stream.c
+++ b/src/t_stream.c
@@ -1025,7 +1025,7 @@ size_t streamReplyWithRangeFromConsumerPEL(client *c, stream *s, streamID *start
if (end && memcmp(ri.key,end,ri.key_len) > 0) break;
streamID thisid;
streamDecodeID(ri.key,&thisid);
- if (streamReplyWithRange(c,s,&thisid,NULL,1,0,NULL,NULL,
+ if (streamReplyWithRange(c,s,&thisid,&thisid,1,0,NULL,NULL,
STREAM_RWR_RAWENTRIES,NULL) == 0)
{
/* Note that we may have a not acknowledged entry in the PEL