mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +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);
|
lp = lpAppendInteger(lp,lp_count);
|
||||||
|
|
||||||
/* Insert back into the tree in order to update the listpack pointer. */
|
/* 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->length++;
|
||||||
s->last_id = id;
|
s->last_id = id;
|
||||||
if (added_id) *added_id = id;
|
if (added_id) *added_id = id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user