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

Abierto
#887 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@TimeToBuildBob ya está trabajando en esto.

Desde el 24/11/2026.

  • #897 de @TimeToBuildBob — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Rust
Estrellas
322
Forks
107
Merge medio
2 d 16 h
PR fusionados (30 d)
25

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de ActivityWatch/aw-server-rust

Todos los issues de ActivityWatch/aw-server-rust

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.