Reputation: 1032
As I know redis is single threaded solution from client point of view. But what about the general architecture?
Amuse we have some lua script that going to execute several commands on keys that has some TTL. How does redis garbage collections works? Could it interrupt the EVAL execution & evict some value or internal tasks share the single thread with user tasks?
Upvotes: 0
Views: 443
Reputation: 49942
Lua is majik, and because that is the case time stops when Redis is doing Lua. Put differently, expiration stops once you start running the script in the sense that time does not advance. However, if a key expired before the script started, it will not be available for the script to use.
Upvotes: 2