From 84b281209a653f8afe5b106ab44d8339fd798823 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 1 Mar 2018 17:25:59 +0100 Subject: [PATCH] Stream: update the listpack pointer in streamTrimByLength(). --- src/t_stream.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/t_stream.c b/src/t_stream.c index da993958..1f2e2094 100644 --- a/src/t_stream.c +++ b/src/t_stream.c @@ -422,6 +422,9 @@ int64_t streamTrimByLength(stream *s, size_t maxlen, int approx) { /* TODO: perform a garbage collection. */ } + /* Update the listpack with the new pointer. */ + raxInsert(s->rax,ri.key,ri.key_len,lp,NULL); + break; /* If we are here, there was enough to delete in the current node, so no need to go to the next node. */ }