Hello! I wonder if there is anything guaranteed about conflict files.
What assumption can be made in case of multiple nodes modifying a single file simultaneously? It seems reasonable to create a conflict file for all changes and that way avoid data loss. Not sure if the last statement is true though…
To make a long story short, I am trying to apply model-based testing techniques to Syncthing and need to make some assumptions which are inviolable unless something unexpected or undesired happened.
So I am already aware of cases how you can do that.
Essentially if you modify on A, modify on B, scan on A, but don’t scan on B, B will happily overwrite what it has as it’s not aware of the local changes.
Each device handles conflicts individually so the number of devices and simultaneous changes should not matter. For files that are known to exist when we begin syncing (i.e., have been scanned at least once) we verify that it’s locally unchanged just before replacing it. I don’t think timing should enter into it.
I was talking for the whole time about concurrent modification of existing files, not creating new ones. The problem seems to has a lot of in common with the issue mentioned by calmh.
To give a better overview of my test - I have a single text file with just a single character in it on three nodes. Each node is in a local network and in sync. I concurrently replace character by some other and then force rescan on one node. Eventually, a change from one node is not present anywhere, so not in the file, nor in any conflict files.
Maybe it is relevant that files are small and the connection is fast… (?)