Open zuiderkwast opened 3 weeks ago
Details about how it really works are in src/expire.c, but I don't think we need to document this in detail. Let's just remove the quoted text and instead just say that Valkey uses an incremental sweep to remove keys that are expired.
Let's also refer to the active-expire-effort
config, which is documented in the valkey.conf
file in the code repo.
We have yet to copy this documentation from the comments in the config file to the documentation page for configs: topics/valkey.conf.md
. (See #154.)
See also #68, about documenting expiration and TTL in general
The EXPIRE command manual (
commands/expire.md
) says that active expiry uses random sampling. This was changed some years ago (Redis 6?) to a scan based approach, i.e. an incremental sweep over all keys with expire.This is the incorrect part of the page: