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 }}
Repository navigation
Out of sync calculation for remote devices becomes odd in three-device setup with middle one ignoring files #7474
Not really. The newly added file does get synced from B to C, but the rest looks exactly the same as before.
The number of Out of Sync Items is also strange. It seems that it includes files that existed in the past, and were ignored at that time, but are long gone now. Currently the only files that exist are 50 files on Device A (plus the 1 file created on B for testing purposes right now). The other 450 files listed below were deleted previously and are no longer present.
The reason is that we have an "efficiency" measure: We do not pull items that are not present at all locally and globally invalid or deleted. B sees valid items from A, thus their global is valid. C only sees invalid items from B, thus their global is invalid and they don't pull. B doesn't know about C's global, thus shows C as out of sync. The fix here is to always pull invalid files ("pull" as in create a local invalid entry too).
Reacted by Jakob Borg, Tomasz Wilczyński, wrvsrx and Railander
Alternately we could just document that this happens and say not to do it.
What should be done in this situation though?
The only workaround that I can think of would be to connect Device A with Device C directly, which in this particular case I cannot do, as Device A is someone else's machine, outside of my control.
I have also tried using the same ignore patterns on Device C, but it doesn't change anything either.
Edit: I just wanted to say thank you very much @imsodin for such a quick fix! 🙂
If you add a single non-ignored thing on the middle device, does that change the situation?
I had a similar problem ("no connected device has the required version of this file" which never ended) with ignore-patterns **(?d).DAV/ and a three-way-sync (because one of these devices is "gone" forever). After removing the "gone" device my problem vanished. Thanks for your hint here 😃
Is it possible to check for sync completeness as "100%" when sync % is maxed out at 99% because ignored directories are considered out of sync? I am trying to use the API to reliably ensure sync is complete--the ignored directories can be considered "synced". Merely checking for 99% is not good enough if I have a large set of files as real (non-ignored) out-of-sync files may still contribute to a 99% completeness.
My issue is with #9804 that's marked as a duplicate of this issue.
changed the title [-]Device tries to push ignored files to a remote device in a 3-device setup[/-][+]Out of sync calculation for remote devices becomes odd in three-device setup with middle one ignoring files[/+]on Jun 8, 2025
I was looking at this issue again because it came up in another bugfix for v2. I think we could "resolve" this in v2 now, but if/how we do so is really more of a philosophical question – what does it mean for a device to be in sync / out of sync as reported in the GUI?
Currently, it answers the question "what does this device report compared to the known global state". In that worldview the current behaviour is correct: the other device is entirely out of sync, because there are a lot of files it can't sync, because we can't serve them, because we've ignored them. We close this issue as functions-as-designed. (The behaviour is the same in v2 as v1 currently, not because I made it that way explicitly but because it kind of comes out of the general principles.)
Instead, we could consider a remote device in sync if it has all the same files and versions that we do. In that case the remote device would look in sync – it has no files, we have none to give it, it's all fine. It would also change things under normal operations. Currently, when we get an update for a file we mark both ourselves and other peers as out of sync until they've synced that file. With this change we'd mark ourselves out of sync, but other peers would remain "in sync" until we've synced the changed file, at which point they would become out of sync until they do the same...
The second alternative is a trickier worldview as we no longer get to compare to a single state, but to a multitude of different ones. We can't just say "needs to be the same as us" because we might be the one out of sync, so we need to take into account their files might be newer. But then we might have two peers who both have newer files than us, but different compared to each other. Currently, we'd compare against the global and say one peer is in sync and the other isn't. If just comparing to ourselves, they would both be newer and both in sync – but not with anything else really...
Reacted by Simon Frei
Reacted by Tomasz Wilczyński, André Colomb and Alexander Ressler
I am facing a similar situation, which involves ignore lists but only two servers. After setting my ignore list in my target server I get them up to date, but because of the missing files that are excluded by ignore list, they think they are out of sync. This is between two servers, let's say A and B, but I have A sync to many servers (C,X,Y) with the same settings and no problems. Let me know if I need to provide more details. I have a topic open in the forum but nobody answers
I've run into this too with three machines: A <- B -> C, but A and C are not connected and don't know about each other. Device A is a Windows host. Device B is a Linux host, and device C is a Mac OS host. I discovered .DS_Store files showing up in B and A. I disconnected everything and wiped out the states to start from scratch, but this time I added .DS_Store to the ignored files on B. Then I joined A and also ignored .DS_Store. Then I joined C, but from B's perspective, A is out of sync because C puts .DS_Store files there. I don't have full control over C, so it would be nice if I could push the ignore list to C, which I don't have full control over, or have B understand that A doesn't want ignored files and omit them from the "out of sync items" calculation. Alternatively, issue #10208 discusses ignoring commonly ignored files, and that'd probably solve it for my situation but not in general.
If you add a single non-ignored thing on the middle device, does that change the situation?
I had a similar problem ("no connected device has the required version of this file" which never ended) with ignore-patterns **(?d).DAV/ and a three-way-sync (because one of these devices is "gone" forever). After removing the "gone" device my problem vanished. Thanks for your hint here 😃
exactly what just happened to me and exactly how i solved it.
Activity
calmh commentedon Mar 14, 2021
If you add a single non-ignored thing on the middle device, does that change the situation?
tomasz1986 commentedon Mar 14, 2021
Not really. The newly added file does get synced from B to C, but the rest looks exactly the same as before.
The number of Out of Sync Items is also strange. It seems that it includes files that existed in the past, and were ignored at that time, but are long gone now. Currently the only files that exist are 50 files on Device A (plus the 1 file created on B for testing purposes right now). The other 450 files listed below were deleted previously and are no longer present.
calmh commentedon Mar 14, 2021
Weird.
tomasz1986 commentedon Mar 14, 2021
Yeah, although the number is likely because I reused my test folder. Normally, there should be just the currently existing 50 files stuck in sync.
imsodin commentedon Mar 14, 2021
This is https://forum.syncthing.net/t/folder-stuck-in-sync-and-non-matching-local-and-global-states/16431/14, right?
The reason is that we have an "efficiency" measure: We do not pull items that are not present at all locally and globally invalid or deleted. B sees valid items from A, thus their global is valid. C only sees invalid items from B, thus their global is invalid and they don't pull. B doesn't know about C's global, thus shows C as out of sync. The fix here is to always pull invalid files ("pull" as in create a local invalid entry too).
calmh commentedon Mar 14, 2021
Alternately we could just document that this happens and say not to do it.
tomasz1986 commentedon Mar 14, 2021
What should be done in this situation though?
The only workaround that I can think of would be to connect Device A with Device C directly, which in this particular case I cannot do, as Device A is someone else's machine, outside of my control.
I have also tried using the same ignore patterns on Device C, but it doesn't change anything either.
Edit: I just wanted to say thank you very much @imsodin for such a quick fix! 🙂
lib/db, lib/model: Allow needing invalid files (fixes syncthing#7474)
calmh commentedon Apr 29, 2021
Not easy to fix, it turns out.
galilley commentedon Aug 3, 2021
Just out of curiosity, are you going to fix it?
lib/db, lib/model: Allow needing invalid files (fixes syncthing#7474) (…
thomasmerz commentedon Aug 9, 2023
I had a similar problem ("no connected device has the required version of this file" which never ended) with ignore-patterns
**(?d).DAV/and a three-way-sync (because one of these devices is "gone" forever). After removing the "gone" device my problem vanished. Thanks for your hint here 😃rieje commentedon Apr 1, 2025
Is it possible to check for sync completeness as "100%" when sync % is maxed out at 99% because ignored directories are considered out of sync? I am trying to use the API to reliably ensure sync is complete--the ignored directories can be considered "synced". Merely checking for 99% is not good enough if I have a large set of files as real (non-ignored) out-of-sync files may still contribute to a 99% completeness.
My issue is with #9804 that's marked as a duplicate of this issue.
[-]Device tries to push ignored files to a remote device in a 3-device setup[/-][+]Out of sync calculation for remote devices becomes odd in three-device setup with middle one ignoring files[/+]calmh commentedon Jun 8, 2025
I was looking at this issue again because it came up in another bugfix for v2. I think we could "resolve" this in v2 now, but if/how we do so is really more of a philosophical question – what does it mean for a device to be in sync / out of sync as reported in the GUI?
Currently, it answers the question "what does this device report compared to the known global state". In that worldview the current behaviour is correct: the other device is entirely out of sync, because there are a lot of files it can't sync, because we can't serve them, because we've ignored them. We close this issue as functions-as-designed. (The behaviour is the same in v2 as v1 currently, not because I made it that way explicitly but because it kind of comes out of the general principles.)
Instead, we could consider a remote device in sync if it has all the same files and versions that we do. In that case the remote device would look in sync – it has no files, we have none to give it, it's all fine. It would also change things under normal operations. Currently, when we get an update for a file we mark both ourselves and other peers as out of sync until they've synced that file. With this change we'd mark ourselves out of sync, but other peers would remain "in sync" until we've synced the changed file, at which point they would become out of sync until they do the same...
The second alternative is a trickier worldview as we no longer get to compare to a single state, but to a multitude of different ones. We can't just say "needs to be the same as us" because we might be the one out of sync, so we need to take into account their files might be newer. But then we might have two peers who both have newer files than us, but different compared to each other. Currently, we'd compare against the global and say one peer is in sync and the other isn't. If just comparing to ourselves, they would both be newer and both in sync – but not with anything else really...
danielo515 commentedon Aug 18, 2025
I am facing a similar situation, which involves ignore lists but only two servers. After setting my ignore list in my target server I get them up to date, but because of the missing files that are excluded by ignore list, they think they are out of sync. This is between two servers, let's say A and B, but I have A sync to many servers (C,X,Y) with the same settings and no problems. Let me know if I need to provide more details. I have a topic open in the forum but nobody answers
aressler38 commentedon Aug 21, 2025
I've run into this too with three machines: A <- B -> C, but A and C are not connected and don't know about each other. Device A is a Windows host. Device B is a Linux host, and device C is a Mac OS host. I discovered .DS_Store files showing up in B and A. I disconnected everything and wiped out the states to start from scratch, but this time I added .DS_Store to the ignored files on B. Then I joined A and also ignored .DS_Store. Then I joined C, but from B's perspective, A is out of sync because C puts .DS_Store files there. I don't have full control over C, so it would be nice if I could push the ignore list to C, which I don't have full control over, or have B understand that A doesn't want ignored files and omit them from the "out of sync items" calculation. Alternatively, issue #10208 discusses ignoring commonly ignored files, and that'd probably solve it for my situation but not in general.
Railander commentedon Dec 14, 2025
exactly what just happened to me and exactly how i solved it.