`scan` for redis service
- Dominant language
- Rust
- Stars
- 5.4k
- Forks
- 825
- Avg merge
- 1d 14m
- Merged PRs (30d)
- 127
Description
## Wanted feature
The `Operator` built from `Redis` could use `scan` to `list` entries matching the [glob-style pattern of redis](https://redis.io/commands/keys/).
## Real scene
There is a function called **move registration** in our system. Users register via the function where the uploading file should be move to after its transmission done. Every registration record has its own ID (`move_id`), and every file also has its own ID (`meta_id`). Then we format them into `movreg_{move_id}_{meta_id}` as the key in redis.
We may have only one of the two IDs to query the value. For example, we have only meta_id `832917` and it was stored as `movreg_432432_832917`; to get the value, we need to excute:
```redis
> keys movreg_*_832917
"movreg_432432_832917"
> get movreg_432432_832917
```
That's why we need glob-style scan in opendal; we want to get all the value whose key matches the given pattern.
## Conjectures about implementation
I think `KEYS` or `SCAN` can work. Both of them could do glob-match on whole database. But `KEYS` is slower in general.
Contributor guide
Research direction
Start by tracing the Operator built from Redis and the existing Redis key and value operations. Compare the requested glob-style lookup with Redis SCAN and KEYS semantics, then determine how matching entries should be exposed. Done means callers can query Redis values using patterns such as movreg_*_832917.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- redis, rust
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100