fs: 目录列举给裸名;目录 key 的 get/get_part 派生 index(#250) - #29
Merged
Merged
Conversation
两处对齐 redis 后端(issue #250): 1. list 的成员前缀目录不再扁平展开 原来把 "string·" 展开为全部 "string·<成员>",父目录会列出所有后代, 递归遍历/重建(layout dump、walk_lib)再也对不上父子层级。 改为发射去 OBJ_SEP 的裸名 —— 与存储索引登记成员前缀节点的方式一致。 2. get_raw / get_part 对目录 key 派生 index XValue 目录 key 在 fs 没有落盘索引(FS 自身即索引),原先直接返回空 → head 读前缀拿到 nil。现在按需用 dir_value().encode() 再返回/切片, 与「目录 key get 返回容器 XValue」一致。 Closes #250 Co-Authored-By: Claude Code <noreply@anthropic.com>
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.
变更(对齐 redis 后端,issue #250)
1. list 的成员前缀目录不再扁平展开
原来把
string·展开为全部string·<成员>—— 父目录会列出所有后代,递归遍历/重建(layout dump、tutorial/07-lib/walk_lib.kv)再也对不上父子层级。改为发射去OBJ_SEP的裸名,与存储索引登记成员前缀节点的方式一致。2.
get_raw/get_part对目录 key 派生 index XValue目录 key 在 fs 没有落盘索引(FS 自身即索引),原先直接返回空 → head 读前缀拿到
nil。现在按需dir_value().encode()再返回/切片,与「目录 key get 返回容器 XValue」一致。背景
排查 kvlang CI 的
test-fs超时时发现:kvspace·listlen("/lib/string/")在 fs 后端返回 0(深层列举拿不到成员)—— 正是 #250 记录的缺口(durable-fs 嵌套容器 memindex 取不回)。待验证
layout dump往返(round-trip)不受影响Closes #250
🤖 Generated with Claude Code