Skip to content

fix exists command on slave#5021

Merged
antirez merged 1 commit intoredis:unstablefrom
soloestoy:fix-exists
Jun 14, 2018
Merged

fix exists command on slave#5021
antirez merged 1 commit intoredis:unstablefrom
soloestoy:fix-exists

Conversation

@soloestoy
Copy link
Contributor

No description provided.

@antirez
Copy link
Contributor

antirez commented Jun 14, 2018

Hello @soloestoy, please could you provide some background so that when I start investigating I directly know what to look for? Thanks.

@soloestoy
Copy link
Contributor Author

soloestoy commented Jun 14, 2018

Sorry... forgot refer to the issue #5015. @antirez

On a related node, EXISTS returns true for logically expired keys on a replica, which is inconsistent with the rest of the read commands.

@antirez antirez merged commit 8bc3ffc into redis:unstable Jun 14, 2018
@antirez
Copy link
Contributor

antirez commented Jun 14, 2018

Thanks, makes sense now. Merged. I'll not backport to 4.0 however since I'm not sure it is an acceptable semantical change to backport, this may have some side effect...

JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Dec 17, 2018
guybe7 added a commit to guybe7/redis that referenced this pull request Nov 4, 2020
Bug was intoduced by redis#5021.

Before that commit, dbExists was used instead of
lookupKeyRead (which affects access time)
oranagra pushed a commit that referenced this pull request Nov 18, 2020
… replica (#8016)

The bug was introduced by #5021 which only attempted avoid EXIST on an
already expired key from returning 1 on a replica.

Before that commit, dbExists was used instead of
lookupKeyRead (which had an undesired effect to "touch" the LRU/LFU)

Other than that, this commit fixes OBJECT to also come empty handed on
expired keys in replica.

And DEBUG DIGEST-VALUE to behave like DEBUG OBJECT (get the data from
the key regardless of it's expired state)
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Nov 19, 2020
… replica (redis#8016)

The bug was introduced by redis#5021 which only attempted avoid EXIST on an
already expired key from returning 1 on a replica.

Before that commit, dbExists was used instead of
lookupKeyRead (which had an undesired effect to "touch" the LRU/LFU)

Other than that, this commit fixes OBJECT to also come empty handed on
expired keys in replica.

And DEBUG DIGEST-VALUE to behave like DEBUG OBJECT (get the data from
the key regardless of it's expired state)
oranagra pushed a commit that referenced this pull request Jan 12, 2021
… replica (#8016)

The bug was introduced by #5021 which only attempted avoid EXIST on an
already expired key from returning 1 on a replica.

Before that commit, dbExists was used instead of
lookupKeyRead (which had an undesired effect to "touch" the LRU/LFU)

Other than that, this commit fixes OBJECT to also come empty handed on
expired keys in replica.

And DEBUG DIGEST-VALUE to behave like DEBUG OBJECT (get the data from
the key regardless of it's expired state)

(cherry picked from commit f8ae991)
pulllock pushed a commit to pulllock/redis that referenced this pull request Jun 28, 2023
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