Library: every Home folder writer takes the Library lock
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by tracing the Library lock and the writer paths named in the issue: the localhost provider and IPFS writes, activation and rollback encryption, and first-read encryption. Then trace the listed handlers and confirm whether update activation stops Runtime before migration. Done means tests show each writer waits for a Library move without losing acknowledged saves, Mac and Linux checks pass with two clients, and independent review passes.
由索引模型根据 Issue 内容生成。
描述
Goal
Every writer that changes files in a Home folder takes the same Library lock as Library, so a Library move, copy or save never overlaps another writer's save.
Where #480 stops
#480 puts these writers under one lock, shared by Runtime and the object-provider process: Library changes, uploads, Documents, viewer storage saves, publish records, and capsule writes to protected Home folders. Library also refuses to change app folders (.AppData, BrowserProfiles) and hides them at the top of the Library.
The writers below still change files in Home folders that Library can change, without that lock:
- B. localhost provider. Write, append, delete and new-folder requests reach the localhost-provider capsule from the capsule resource bridge (writes when the Home folder is not protected; delete and new folder always) and from the
/api/provider/localhostproxy. The IPFScat_to_pathanddownload_directoryoperations can also write underUsers/. - C. Encryption at Profile setup and recovery.
migrate_principal_root_plaintext_objects_under_activationand the journal rollbackrestore_journal_plaintext_objectreplace Library files while Home runs, under the object mutex and lifecycle lock only. - D. First-read encryption of older plaintext Library files.
protect_legacy_plaintext_principal_root_object, reached from Library reads in both processes, reads, encrypts and writes back without the lock. This overlaps #450.
Also confirm: the update activation path (acquire_principal_root_update_lock) stops Runtime before it migrates Home folders; and trace the handlers the #480 inventory did not reach (inbox_action, System AI provider, approval lens and community, capsule_interface_invoke, Home launch, the home-cli renderer child).
Proposed change (about 100 lines plus tests)
- B: Runtime takes the Library lock around forwarding write, append, delete and new-folder requests for
Users/paths, protected or not; refuse or lock IPFS destinations underUsers/. - C: the activation guards take the Library lock before the object mutex.
- D: first-read encryption takes the Library lock when its caller does not already hold it (a per-thread marker keeps locked Library operations from waiting on themselves).
Done when
- A test for each writer shows that it waits for a Library move and that no acknowledged save is lost (fail-before first).
- An installed Mac and Linux check with two clients passes.
- Independent review passes.
Related: #480, #450.
- 主要语言
- Rust
- 星标
- 6
- 派生
- 2
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 42
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
elastos/elastos-runtime 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
elastos/elastos-runtime#563 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
elastos/elastos-runtime#508 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
elastos/elastos-runtime#436 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
elastos/elastos-runtime#427 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
elastos/elastos-runtime#405 ·
维护者通常 1 天内回复
查看 elastos/elastos-runtime 的全部 Issue
相似的 Issue
-
Unit tests use deprecated constant (part 2)可能已有人在做 @servo-highfive 今天认领。 未关闭E-less-complex
难度 1/5 1 小时以内 新手友好度 84/100
维护者通常 1 天内回复
-
bug good first issue help wanted linux macos testing
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
area: app type: test
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
bug priority: medium
难度 2/5 1-3 小时 新手友好度 78/100
storytold/photocraft#12706 · 1 条评论 ·
维护者通常 1 天内回复
-
bug priority-low to-agent
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复