You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Global state incorrect when ignoring local change #6850
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
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?
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:
Send Only folder on Device A. Receive Only folder on Device B. Everything is in sync.
Delete files on Device B. Receive Only folder is now marked "Local Additions".
Change both folders to "Send & Receive".
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?
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.
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Activity
lib/db: Update global meta even if unchanged (fixes syncthing#6850)
lib/db: Update global meta even if unchanged (fixes syncthing#6850) (s…
Merge branch 'main' into lib/tHEcASeSPreCIoUs
imsodin commentedon Jul 28, 2020
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?calmh commentedon Jul 28, 2020
Sounds reasonable to me. Generally we should never add invalid stuff to the global state, and those are invalid-ish?
lib/db: Don't count invalid items to global state (ref syncthing#6850)
tomasz1986 commentedon Jul 28, 2020
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:
Is this somewhat related, or a completely different issue?
imsodin commentedon Jul 28, 2020
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.
lib/db: Don't count invalid items to global state (ref #6850) (#6863)