-
Notifications
You must be signed in to change notification settings - Fork 1k
Add argument to dont expire when loading from snapshot #3858
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
Comments
Why does it ? If an element has expired then why would I want to restore it ? Does something similar exist for Valkey or ? |
Restoring everything (applications and cache) to the same date as snapshot may be expecting that a key with expiration is still there but when starting it is already gone from cache because it expired due to the date jump. This may well be a design flaw from applications using cache but with that argument we could control the behavior and even recover important data from cache that would expire eventually when recovering from a snapshot. Right now even if i needed to look what data was in a snapshot i can't. |
@cfradewavecom I genuinely don't see or understand why this is a problem ? You got a snapshot let's say at time This looks more of a design defect of an application. Simply, if you don't want certain elements to expire, then don't attach an expiration date to them. @romange Any ideas why this would be useful ? |
Hi @cfradewavecom,
That's why there is replication right ? I am not familiar much with Redis Insight, but I guess if it can load an rdb fille you can do the same with DF, but saving into the old rdb format (and not the one we provide). However this will have a few downsides I am afraid |
Yes i notice that after the event and arrive to the same conclusion as you. The snapshot that i needed was in your native format.
|
Thanks @cfradewavecom I think this is a good suggestion. The task is:
|
I can take a stab at this if no one is working on this task |
take |
Sure, why not. |
Added a new flag --ignore-expiry to ignore key expiry when loading from RDB Snapshot. Also cached this flag into RDBLoader object to reuse it.
Added a new flag --rdb_ignore_expiry to ignore key expiry when loading from RDB Snapshot. Also cached this flag into RDBLoader object to reuse it.
feat(rdb_load): Added a flag to ignore key expiry #3858. Added a new flag --rdb_ignore_expiry to ignore key expiry when loading from RDB Snapshot. Also cached this flag into RDBLoader object to reuse it.
When restoring from an older snapshot redis keys with expire TTL are removed at start.
I understand that this maybe the default flow but in my opinion breaks the concept of
snapshot
.My request is to add a new argument, for example
--no-expire
to allow all data from snapshot to be recovered.The text was updated successfully, but these errors were encountered: