Library: every Home folder writer takes the Library lock
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 6
- Fork
- 2
- Merge trung bình
- 1 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 42
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của elastos/elastos-runtime
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elastos/elastos-runtime#563 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
elastos/elastos-runtime#508 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Documents: Markdown preview web links go through Home's confirmed link flow (#430 follow-up)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
elastos/elastos-runtime#436 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
elastos/elastos-runtime#427 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
elastos/elastos-runtime#405 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của elastos/elastos-runtime
Issue tương tự
-
bug good first issue help wanted linux macos testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area: app type: test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
storytold/photocraft#12706 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug priority-low to-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
examples/dca and limit-order: swap always fails on the real Soroswap router (deadline equals now)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
sorocon-labs/sorocron#172 ·
Maintainer thường phản hồi trong vòng 1 ngày