Design an opt-in atomic whole-file replacement API

Đang mở
#1,038 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
operating-systems

Hướng nghiên cứu

Start with std/fs/file.wave:247 and inspect fs_write_all, io_write_all, and the existing rename provider boundaries before designing the opt-in API. The agreed contract must define candidate creation, permissions, symlinks, flush and rename behavior, cleanup, and the distinction between atomic visibility and crash durability. Done means failures preserve the old destination, provider-specific ownership and link behavior are explicit, and atomic visibility plus durability guarantees are tested and documented.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

discussion enhancement help wanted

Motivation

fs_write_all intentionally opens/truncates the destination before writing. That existing behavior is useful, but cannot preserve the old file if a later write fails; applications saving configuration need a separate opt-in replacement operation.

Starting point: std/fs/file.wave:247.

Validation

Audited canonical Wave 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 (0.0.1-alpha-dev), whose tree matches the local checkout. Validation: Inspected fs_write_all/io_write_all and existing rename provider boundaries. Executed compiler probes use the matching checkout-built compiler and std on Linux amd64 (Rust 1.89.0 / LLVM 21.1.8). Source/header or mocked checks are not native execution on another OS.

Scope

Design same-directory candidate creation, permission/symlink handling, flush/rename and cleanup rules. Distinguish atomic visibility from crash durability and do not change existing fs_write_all semantics.

Related: #738, #382. These links do not claim those broader or completed scopes are unfinished.

Design discussion required

This issue records a proposal or an unresolved contract; it is not approval to choose new semantics. Please mention @LunaStev to discuss the design before starting implementation.

Completion criteria

  • The agreed API preserves the old destination on controlled write/close/activation failures.
  • Ownership, permissions and link behavior are explicit across providers.
  • Atomic visibility and durability guarantees are tested and accurately documented.
Ngôn ngữ chính
Rust
Star
56
Fork
21
Merge trung bình
23 giờ 20 phút
Pull request đã merge (30 ngày)
45

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wavefnd/Wave

Tất cả issue của wavefnd/Wave

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.