Library: preserve concurrent changes during conditional save and move
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
- 25/100
Hướng nghiên cứu
Read elastos/crates/elastos-server/src/library.rs around the conditional write (develop line 3704) and move path (line 6630), plus api/gateway_provider_proxy.rs around lines 439–448 and 802–811. Start by tracing how revision checks and mutation ownership work across the Library and object-provider processes. Done means deterministic conflict tests cover concurrent writes, move/upload, and copy/destination creation, with acknowledged data preserved and destination failures leaving the source intact; the issue also calls for installed Mac and Linux checks and independent review.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
User impact
A Library operation can overwrite a newer save or remove newer source bytes while reporting success. This is a proposed 0.8.0 release-blocking data-integrity finding from the systematic review in #93. Source review confirms the race; installed reproduction and its frequency remain unmeasured.
Source evidence
Checked on fetched develop 3beb816438fd567145a8d725e22465bd83277cf0 and local release candidate 460b1888d344f52cebd1c25866be88ff4085f035. Two independent reviewers and the lead checked the call path.
- In published develop, Library conditional write checks the expected revision before calling the unconditional protected-object writer at line 3718. Candidate equivalents are
library.rs:3774,3789. - The protected-object writer acquires its mutation lock after that check. Two callers can both accept revision R and then both save, so one acknowledged change is lost.
- Candidate
library.rs:7194-7206reads a source, writes the destination, then removes the source. An upload between the read and removal can be acknowledged and then lost. The develop equivalent starts at line 6630. - Ordinary object-provider messages are serial, but gateway raw upload and chunk completion call the Library write path directly (
api/gateway_provider_proxy.rs:439-448,802-811). That path can overlap the separate object-provider process. The auth mutation mutex is process-local. - Documents already holds a mutation guard across its revision check and write. Library needs one ownership boundary that also covers its gateway/provider split.
Smallest repair and proof
Keep user-visible operation semantics. Make revision validation and commit one operation. Give move/copy explicit source and destination ownership, and preserve a newer source version if another writer changes it. A lock confined to only one process is insufficient for the current paths.
- A deterministic write/write test admits only one request using the same old revision; the other receives a conflict.
- Move/upload and copy/destination-create tests preserve all acknowledged data and report a clear conflict.
- Destination failure leaves the original source intact.
- Exercise gateway upload together with the external object-provider path.
- Installed Mac and Linux checks cover two concurrent clients and restart/recovery.
- Independent review and exact-candidate acceptance are recorded before closure.
Deduplication: #450 covers opening/lazy protection, #445 listing, #449 extraction, and PR #428 UI behavior. This issue owns mutation atomicity. Searches of open and closed issues found no matching owner. This issue is queued for release triage; the audit started no implementation work.
- 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