-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
redis API: zset range delete performence sucks #1119
Labels
Comments
wanghenshui
changed the title
zset范围删除性能较差
redis API: zset range delete performence sucks
Feb 22, 2023
|
显荣:限制zset插入个数,然后看delete性能提升 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
交流群里收集到的场景
用户使用版本 3.3.6
使用zset做时间过滤,score存时间,然后删除
用户的使用场景是删除不需要立即生效,删除了就行
解决方案
1 ZREMRANGEBYSCORE使用Rocksdb新API DeleteRange实现,需要升级api
2 利用compact,开洞一个CompactByScore接口,定时调用删除key,但是binlog的流水没有删除
方案1 最简单,但是需要升级rocksdb,方案2 需要业务配合改代码,且有遗留脏数据
综上选1
The text was updated successfully, but these errors were encountered: