Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis 4.0 - Slave - Key dissapears #7423

Open
fruscitti-rb opened this issue Jun 22, 2020 · 1 comment
Open

Redis 4.0 - Slave - Key dissapears #7423

fruscitti-rb opened this issue Jun 22, 2020 · 1 comment

Comments

@fruscitti-rb
Copy link

Hi. We have a redis 4 installation with sentinel.

The slave starts ok, but after certain amount of time some keys 'dissapears' from the slave.

Checking, if I issue a debug object command there is information about the key

debug object mediospago:105
Value at:0x7fe51c0f4430 refcount:1 encoding:ziplist serializedlength:461 lru:15779462 lru_seconds_idle:1940

But if I try to access the key it is not retrieved:

127.0.0.1:10016> keys mediospago:105
(empty list or set)

redis_version:4.0.10
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:db2df09a69756294

redis_version:4.0.10
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:db2df09a69756294

Thanks very much.

@trevor211
Copy link
Collaborator

trevor211 commented Jul 31, 2020

Can you get the key from its master and then reproduct it again?

Redis expire keys in a lazy way, if some key is logically expired, it doesn't need to be deleted from db.
But if you get it from the api, you got nothing.
There are 2 scenarios:
1st get the key from master: the key gets deleted from db then the delete action replicated to its replicas to inform them delete the key from db.
2nd get the from replica: replica returns null, but does not delete the key from db.

The DEBUG OBJECT is not expected to get the keys but to analyze, so it is possible to view expired keys from replica.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants