From 594d3b9023e16d5bc6470f6418b39b057b95ec8f Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Sat, 4 Aug 2018 01:06:53 +0800 Subject: [PATCH] Streams: update listpack with new pointer in XDEL --- src/t_stream.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/t_stream.c b/src/t_stream.c index 77fbf4645..c5d3c7f9d 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -724,6 +724,9 @@ void streamIteratorRemoveEntry(streamIterator *si, streamID *current) { p = lpNext(lp,p); /* Seek deleted field. */ aux = lpGetInteger(p); lp = lpReplaceInteger(lp,&p,aux+1); + + /* Update the listpack with the new pointer. */ + raxInsert(si->stream->rax,si->ri.key,si->ri.key_len,lp,NULL); } /* Update the number of entries counter. */