what if question


I would like to know what happens when in a setup like the below

syncthing1 - fully scanned manually. no scan intervals or notifiers setup. Only manual scan.

syncthing2 - no started yet

Syncthing1 is fully scanned but some file changed which has not yet been added to the database(scanned) with the new hash. If I start syncthing2, and it needs the file that has been changed. Would it get the new file ? Cause a conflict or nothing of the above ?

Syncthing2 will try to get the old file, syncthing1 will notify that it changed, thus 2 gets an error. Then 1 rescans that file and announces the update to 2, 2 will try to get that new file and that will succeed -> no conflicts.

so the rescan is done after 1 sees that the file requested has changed. That means that when syncthing tried to share the file it also checks if it has changed. No manual user rescan is needed or any other kind of scan.

1 Like

Yes, we check that what we read is what we believe is the latest the version. In this case it’s not as we see that what we’ve advertised is not what we have anymore and rescan.

However, this is how it’s implemented now and is subject to change if we decide to, so probably you should not rely on this behaviour.

Actually I consider rescanning/checking if it changed the file every time some node requests it too much and would love a to see a config option not to have that. It would make sharing faster I guess but then it would also complicate things a bit.

Just to make sure I’m on the right track though, you can only the file not all syncthing folder/files right ?

I don’t think it would make things faster, as we get sent both hashes, weak and strong. Weak hash hashing rate is in the gigabytes a second, so it’s negligible. If they don’t match we take the slow path, but even then, that’s hundreds of megabytes a second on a normal computer, usually faster than you get over internet.

I would appreciate if you tell us your experience (and confirm) after you checked this, because sometimes it seems to me, syncthing does not work as described here. :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.