Skip to content

Files ignored on one remote do not get synced #7608

Closed

Description

@imsodin

Came up in https://forum.syncthing.net/t/syncthing-lost-one-file-out-of-a-dozen-on-one-node/16721.

Reproducer:

Initial State: Devices A, B share a folder. A has file F, B ignores file F.

  1. Connect additional device C to B, wait for index exchange and sync/pull to finish.
  2. Connect C to A.

Expected: File F gets synced to C.

Result: File F does not get synced to C.

This is a regression introduced in #7476, which in turn fixes #7474.

Activity

  1. added
    bug
    on Apr 29, 2021
  2. added 4 commits that reference this issue on Apr 29, 2021
    9749f46
    6e066b6
    effc5c8
    7449c59
  3. calmh commented on Apr 29, 2021

    @calmh
    Member

    I don't understand. Why doesn't C prefer the non-invalid version of F and pull that?

  4. imsodin commented on Apr 29, 2021

    @imsodin
    MemberAuthor

    Since #7476 C pulls the global invalid file in step 1, i.e. it has the newest version locally, just invalid. And having an up-to-date invalid file means being in-sync, not needing a file. Otherwise e.g. an ignored file would keep being "pulled", and marked as ignored.

  5. calmh commented on Apr 29, 2021

    @calmh
    Member

    Right.... We could react to the fact that the head of the global list goes from being invalid to being valid, but since we already have an in-sync (but invalid) entry we don't do anything, as this is the same situation as if we'd ignored it ourselves for example. A pickle, indeed.

  6. imsodin commented on Apr 29, 2021

    @imsodin
    MemberAuthor

    Exactly. I considered two options to solve this:

    1. Just mark everything as needed when the global version changes from invalid to valid. Problems:
      Whether an item is needed is then based on transient information. When the item changes in the future, it's not clear whether it was needed or not before -> messed up accounting.
      And even worse: We'd then need more special cases in the puller: It needs to handle pulling stuff that we don't actually need (e.g. locally changed item is then suddenly needed, but we shouldn't actually override that with the global).
      A no-go.
    2. Add a new local invalid flag FlagLocalGlobalInvalid and consider needed when that flag is set and the global is valid, regardless of version. Works, but means that we either need to do an additional file info lookup when updating a local file or store that local flag in the global version list. Seems doable, but still means lots of complexity.
  7. calmh commented on Apr 29, 2021

    @calmh
    Member

    I see now how the status quo becomes the more preferable option.

  8. added this to the v1.17.0 milestone on May 11, 2021
  9. added a commit that references this issue on May 21, 2021
    048d5dd
  10. added
    frozen-due-to-age
    on Aug 11, 2022
  11. locked and limited conversation to collaborators on Aug 11, 2022
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

    bugfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions