Skip to content
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

allow scanning based on keys attributes #4537

Open
romange opened this issue Jan 30, 2025 · 0 comments
Open

allow scanning based on keys attributes #4537

romange opened this issue Jan 30, 2025 · 0 comments
Labels
enhancement New feature or request fun Fun tasks minor nice to have enhancement

Comments

@romange
Copy link
Collaborator

romange commented Jan 30, 2025

Add another filter to the SCAN command:

ATTR <mask>

to be able to scan keys based on additional attributes:
mask may contain the following attributes:

  1. v - volatile, keys that have ttl
  2. p - permanent, keys that do not have ttl
  3. a - accessed, the key has been accessed since the last load/flush event, or the last time a flag was reset.
  4. u - untouched, the key has not been accessed/touched.

in the future:

  • d the value resides on disk
  • m the value resides in memory

for (3), (4) we need to introduce an additional flag in CompactObject to track it on keys (note that usually the flags keys are set on values).
Also we will need a DEBUG ACCESS RESET to reset a attributes for the current database.

Note that we already provide undocumented "BUCKET " filter for SCAN.

@romange romange added enhancement New feature or request fun Fun tasks minor nice to have enhancement labels Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fun Fun tasks minor nice to have enhancement
Projects
None yet
Development

No branches or pull requests

1 participant