fix: blockcache compute problem
#3168
share-block-cache 为yes时,多个 Column Family 共享同一个 block cache,但在统计 block cache usage 时,代码仍然对每个 CF 分别查询然后累加,导致同一个 block cache 的使用量被计算了多次。
修复前,hash,list,set 的计算均为两倍,zset为三倍:
修复后这些数据结构的不会再被计算多次:
添加测试:
[!IMPORTANT]
Review skipped
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
[!NOTE]
Other AI code review bot(s) detected
CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.
✨ Finishing touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.
修复 CI 的部分去掉吧,一个 PR 做一件事
Done.
Bot detected the issue body's language is not English, translate it automatically.
Get rid of the part about fixing CI, one PR does one thing
Done.