In order find all existing (for example) STREAM in Redis a full scan is needed. That might be a very wasteful especially in case where Redis holds many non-streams keys.
Suggested API:
SCAN cursor [MATCH pattern] [COUNT count] [TYPE type]
This feature can help in couple of use cases: 1. Streams Auditing 2. Generic consumer groups 3. Streams visualization 4. Monitor
Comment From: soloestoy
Sounds reasonable.
Comment From: AngusP
Interesting quirk here is that the GEO* commands are zsets not their own type, so they're not distinguishable from other ZSETS - afaik they're the only 'weird' pseudo-type... (edit: As pointed out below, HyperLogLogs and the BIT* array commands are also string-backed types)
I've written a basic implementation of this (#6116); It's something I think I'd find useful, and it has broader appeal than just stream finding (migrations, manual garbage collection etc.)
Comment From: itamarhaber
Additional known "quirks", atm, are HyperLogLogs, Bitmaps (arrays) and Bitfields are all encoded as Redis Strings - and are (almost) indistinguishable from user-provided strings (the exception is HLL that has a "signature").
That said, I wouldn't fret about this 🙂
Comment From: AngusP
Hey @gkorland (cc. @antirez ) just to say hopefully this has been resolved so can be closed now? :wink:
Comment From: itamarhaber
Added via #6116 - closing.