Open
Description
The problem/use-case that the feature addresses
In scenarios like data migration validation or hotkey analysis, users need to efficiently sample a subset of keys without full-database scanning. Current approaches require either:
- Pulling all keys via SCAN and filtering client-side (high network overhead), It has a large impact on the original node, and the full scan takes a long time
- Running full RDB checks (resource-intensive for large datasets), the operation needs to be performed on the machine of the instance
Description of the feature
we can enhan the functionality of the scan command:
SCAN cursor [MATCH pattern] [PROBABILITY float] [COUNT count]
- PROBABILITY: 0.0-1.0 (probability threshold)