Repository navigation
refactor(cache): change CacheFS to query-driven caching - #6346
Draft
baojun-zhang wants to merge 3 commits into
Draft
baojun-zhang wants to merge 3 commits into
baojun-zhang wants to merge 3 commits into
Conversation
baojun-zhang
marked this pull request as draft
October 20, 2026 10:06
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
将cachefs 对象从文件状态记录驱动(file/dir/subtree 模式)优化为查询结果记录驱动(path + op)
旧版本问题:
file/dir/subtree对象模式缓存.file/dir缓存文件系统对应内容,subtree维护目录版本关系。如果 10w 文件 + 1w 目录近期被访问,最多会生成约10w + 1w + 1w = 12w个 cache keygrep为了收集结果扫了 1000 个文件,可能额外生成约 1000 个filekey,并把这 1000 个文件正文放进 Redis。 ls/tree/glob/ 同理新版:
path + op建 key, 不再因文件正文读取天然膨胀。Human Involvement
Related Issue
Type of Change
Changes Made
file/dir/subtree对象缓存改为path + op查询结果缓存。stat、read_dir、tree_directory、glob_directory、grep的查询结果。UNLINK删除 query bucket,并用全局 ZSET index 清理后代 bucket。.path.ovlock、.exact.ovlock.*等 PathLock 内部文件,避免进入查询缓存。Testing
Checklist
Screenshots (if applicable)
Additional Notes