Skip to content

Redis can fetch outdated data ? #11765

Discussion options

You must be logged in to vote

Hello @vincent-herlemont

If Redis crashes and doesn't have time to write the latest information to disk, will it refetch data from disk when next restart?

Yes. If Redis restarts and find persistence files, it will load them. Depending on the server's load, storage, and settings (snapshot frequency/fsync policy), the persisted data may be incomplete (e.g. if the server crashed before writing it).

If this is a real concern in your use case, I suggest you don't use persistence and always restart with a cold cache. The alternative would be to setup the server with fast storage, and using AOF on every write, although even this setup isn't guaranteed not to lose writes in extreme cases.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vincent-herlemont
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants