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

Adding Type Filter to initial SCAN #521

Open
koromkorom opened this issue May 8, 2023 · 1 comment
Open

Adding Type Filter to initial SCAN #521

koromkorom opened this issue May 8, 2023 · 1 comment

Comments

@koromkorom
Copy link

Hi,

I just wanted to suggest to add the TYPE filter as a feature in redis commander for the initial SCAN (in case USE_SCAN is set) in addition to MATCH (which uses ROOT_PATTERN).

For me this would be really nice, because I am having 100k similar string keys, but I am actually mostly interested in just 5 lists or so. If there was a negative filter (or regex) for MATCH, I could use that, but unfortunately that's not possible. The 100k strings cause a lot of load locally for some reason.

In case adding the TYPE parameter is something you would be interested in, I could also do a PR. Maybe call it ROOT_TYPE?

@sseide
Copy link
Collaborator

sseide commented Jun 15, 2023

Hi - sorry for late response.

Yes this sound usefull and a PR is welcome.
"ioredis" seems to support it (https://redis.github.io/ioredis/classes/Redis.html#scan) therefore should be possible.

  • in "default.json" an empty pattern config entry should be provides to not change default behaviour
  • ROOT_TYPE seems resonable compared to existing env vars (defined in "custom-environment-variables.json")
  • using "keys" instead of "scan" the parameter is ignored. Maybe a warning on startup that type is set without using scan might be helpful. But this should not be printed on every scan run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants