Skip to content

Global state incorrect when ignoring local change #6850

Closed

Description

@imsodin

Steps to repro:

  1. Create receive-only folder
  2. Add some file, which is then displayed as a local change.
  3. Add an ignore pattern matching the added file.

Result: Local state zero, global state still 1.

Expected: Both 0.

Activity

  1. added
    bug
    on Jul 24, 2020
  2. self-assigned this
    on Jul 24, 2020
  3. added a commit that references this issue on Jul 24, 2020
    7f569cd
  4. added a commit that references this issue on Jul 24, 2020
    806c5a6
  5. added a commit that references this issue on Jul 27, 2020
    5acc063
  6. added this to the v1.9.0 milestone on Jul 28, 2020
  7. imsodin commented on Jul 28, 2020

    @imsodin
    MemberAuthor

    I just realized the same problem exists in removeFromGlobal. However thinking a bit more about it, why do we include receive-only changed items in the global count in the first place? That seems completely wrong to me: The global state is what everyone agrees upon. Receive-only changed items are the complete antithesis to that. If we didn't add it to the global state, receive-only items would lead to a higher local than global state, which seems right. It also removes the need for the workaround added in #6852. Thus I propose to not add invalid items to the global state. Am I missing some catch with that?

  8. calmh commented on Jul 28, 2020

    @calmh
    Member

    Sounds reasonable to me. Generally we should never add invalid stuff to the global state, and those are invalid-ish?

  9. tomasz1986 commented on Jul 28, 2020

    @tomasz1986
    Member

    I hope it is OK to write here instead of the forum, as this has just come to my mind while reading the @imsodin's message. I had a problem when my Receive Only folder was in a "Revert Local Changes" state, i.e. after deleting some files locally. Without pressing the red button, I changed the folder type from "Receive Only" to "Send & Receive". However, Syncthing would still not push the local deletions to the other device, and the folder itself was marked "Up to Date", even though some of the files were missing from it.

    The scenario is basically this:

    1. Send Only folder on Device A. Receive Only folder on Device B. Everything is in sync.
    2. Delete files on Device B. Receive Only folder is now marked "Local Additions".
    3. Change both folders to "Send & Receive".
    4. Both Device A and B marked "Up to Date", but the deleted files are not pushed to Device A.

    Is this somewhat related, or a completely different issue?

  10. imsodin commented on Jul 28, 2020

    @imsodin
    MemberAuthor

    That's most likely unrelated, as it concerns actual syncing while this issues is entirely about metadata (local/global states). I might have an idea what you are experiencing, but lets take that to the forum please.

  11. added
    frozen-due-to-age
    on Jul 25, 2021
  12. locked and limited conversation to collaborators on Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugfrozen-due-to-age

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions