mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
streamAppendItem(): Update the radix tree pointer only if changed.
This commit is contained in:
parent
9d4f51e1ff
commit
32e0d2376f
@ -349,7 +349,8 @@ int streamAppendItem(stream *s, robj **argv, int64_t numfields, streamID *added_
|
||||
lp = lpAppendInteger(lp,lp_count);
|
||||
|
||||
/* Insert back into the tree in order to update the listpack pointer. */
|
||||
raxInsert(s->rax,(unsigned char*)&rax_key,sizeof(rax_key),lp,NULL);
|
||||
if (ri.data != lp)
|
||||
raxInsert(s->rax,(unsigned char*)&rax_key,sizeof(rax_key),lp,NULL);
|
||||
s->length++;
|
||||
s->last_id = id;
|
||||
if (added_id) *added_id = id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user