Skip to content

allow dictFind using static robj#7152

Merged
antirez merged 1 commit intoredis:unstablefrom
oranagra:dict_find_static_robj
Apr 27, 2020
Merged

allow dictFind using static robj#7152
antirez merged 1 commit intoredis:unstablefrom
oranagra:dict_find_static_robj

Conversation

@oranagra
Copy link
Member

since the recent addition of OBJ_STATIC_REFCOUNT and the assertion in
incrRefCount it is now impossible to use dictFind using a static robj,
because dictEncObjKeyCompare will call getDecodedObject which tries to
increment the refcount just in order to decrement it later.

since the recent addition of OBJ_STATIC_REFCOUNT and the assertion in
incrRefCount it is now impossible to use dictFind using a static robj,
because dictEncObjKeyCompare will call getDecodedObject which tries to
increment the refcount just in order to decrement it later.
@oranagra
Copy link
Member Author

@antirez problem was found in ROF, but could still be hiding in redis somewhere.
fact is that it used to work till now and now it explodes.
it's not an elegant solution, please replace or extend if you can think of something else.

@antirez
Copy link
Contributor

antirez commented Apr 27, 2020

@oranagra well it looks good enough to me. I'm merging and just fixing the comment that says the other function name. Thank you.

@antirez antirez merged commit 7331675 into redis:unstable Apr 27, 2020
@oranagra oranagra deleted the dict_find_static_robj branch April 28, 2020 05:56
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants