crodas / microredis

Redis server implemented in rust.
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Fixed bug with PERSIST #28

Closed crodas closed 2 years ago

crodas commented 2 years ago

PERSIST operation did not remove the key from the purge process. Microredis does have a dedicated structure to watch keys with expirations in it.

Previous this commit if a key had any expiration and then this expiration was removed with the PERSIST command, the expiration would be removed from the key-itself, but the purge process (which is a background process) wouldn't know about this change removing the key in due time.

This commit notifies of PERSIST changes to the purge process.