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

オープン
#887 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@TimeToBuildBob がすでに取り組んでいます。

2026年11月24日 から。

  • #897 @TimeToBuildBob による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
30/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
rust
領域
cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
Rust
スター
322
フォーク
107
平均マージ
2日 16時間
マージ済み PR(30日)
25

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ActivityWatch/aw-server-rust のほかの issue

ActivityWatch/aw-server-rust の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。