Skip to content

sync: a failed blob check or event subscription is dropped without a log line #211

Closed

Description

@frostyard-machines

Two places in the sync loop drop an error with no log line and no retry:

  1. internal/syncer/loop.go:549-555 (upload): if ok, err := l.s.cfg.Blobs.Has(p.Hash); err == nil && ok. When Has fails (a stat error other than "not found", internal/blobs/blobs.go:242-253), the hash is left out as if the device did not hold it. It is never offered to log.missing, so its content never goes up, and the push it belongs to comes back refused missing on every retry. Nothing says why.
  2. internal/syncer/loop.go:189-195 (watchLocal): when Broker.Subscribe fails (it reads LatestSeq from the database, internal/events/broker.go:78-82), the goroutine returns for good. After that no local change marks a path dirty, so the device pushes local edits only at the next idle pull, for as long as notesd runs.

What's wanted: (1) return or record the error of Has instead of skipping the hash; (2) log the error and subscribe again after a short backoff while ctx is live. Both are changes in behavior, each small; a test with a failing Has and a failing first Subscribe can hold them.

Found in a code review of main at b9c6c90.

Activity

  1. added
    bug
    on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions