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

redis API: zset range delete performence sucks #1119

Closed
wanghenshui opened this issue Dec 2, 2021 · 3 comments
Closed

redis API: zset range delete performence sucks #1119

wanghenshui opened this issue Dec 2, 2021 · 3 comments

Comments

@wanghenshui
Copy link
Collaborator

交流群里收集到的场景
用户使用版本 3.3.6

使用zset做时间过滤,score存时间,然后删除
用户的使用场景是删除不需要立即生效,删除了就行

解决方案
1 ZREMRANGEBYSCORE使用Rocksdb新API DeleteRange实现,需要升级api
2 利用compact,开洞一个CompactByScore接口,定时调用删除key,但是binlog的流水没有删除

方案1 最简单,但是需要升级rocksdb,方案2 需要业务配合改代码,且有遗留脏数据

综上选1

@wanghenshui wanghenshui changed the title zset范围删除性能较差 redis API: zset range delete performence sucks Feb 22, 2023
@wanghenshui wanghenshui mentioned this issue Feb 22, 2023
78 tasks
@AlexStocks AlexStocks assigned machinly and unassigned machinly Apr 10, 2023
@AlexStocks
Copy link
Collaborator

@wxr

@AlexStocks
Copy link
Collaborator

AlexStocks commented Jul 7, 2023

        * 0429 吴显荣 [Mixficsol](https://github.com/Mixficsol) 领取该任务
        * 0506 有待继续推进
        * 0527 [跟进进度]
        * 0603 后续继续推进
        * 0624 初步方案讨论
        * 0701 暂时搁置
        * 0805 已经提pr需要测试效果及cpu损耗
        * 0809 目前RocksDB的DeleteRange存在bug,暂时不考虑跟进

@yaoyinnan
Copy link
Contributor

显荣:限制zset插入个数,然后看delete性能提升

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

Successfully merging a pull request may close this issue.

5 participants