aw-sync status calls the daemon's live staging db orphaned and safe to delete

Đang mở
#887 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

@TimeToBuildBob đang làm issue này rồi.

Từ ngày 24/11/2026.

  • #897 của @TimeToBuildBob — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
cli

Hướng nghiên cứu

Start in aw-sync/src/status.rs around lines 270-320, where the orphaned-database check and its warning text live, then compare with where the daemon stages its db in aw-sync/src/main.rs (~452) and where plain sync writes the 3-level layout in sync_wrapper.rs (155-167). Reproduce with the two-server steps in the issue. Done means status no longer flags this device's own live 2-level db and the wording says "equal or larger". Open PR #897 already targets this, so check it before starting.

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

Mô tả

aw-sync status (#788) reports the daemon's live staging database as orphaned and tells the user to delete it:

orphaned … safe to delete (Syncthing will propagate the delete)

On master (ea6f09c) the daemon still stages at the 2-level path (aw-sync/src/main.rs ~452); only plain aw-sync sync (host mode, sync_wrapper.rs:155-167) writes the 3-level layout. The comment at aw-sync/src/status.rs:270 assumes the 2-level db is legacy, but it isn't. Deleting it as advised forces a full re-export and propagates the delete to every peer.

The message also says the 3-level entry is "larger" when both files are the same size.

Repro (two servers, shared sync dir $S):

aw-sync --sync-dir $S --port $P sync          # writes the 3-level db
# add an event to the server on $P
timeout 12 aw-sync --sync-dir $S --port $P daemon   # writes the 2-level db
aw-sync --sync-dir $S --port $P status        # warns that $S/<device_id>/sync.db is orphaned and safe to delete

Reproduced twice.

Possible fix in status.rs ~275-320: don't flag this device's own 2-level db while the daemon stages there (check only peers, or compare mtimes), and say "equal or larger". Related: #682 (the two layouts).

Ngôn ngữ chính
Rust
Star
322
Fork
107
Merge trung bình
2 ngày 16 giờ
Pull request đã merge (30 ngày)
25

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

  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 ActivityWatch/aw-server-rust

Tất cả issue của ActivityWatch/aw-server-rust

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.