I’m having frequent conflicts, and I’m not sure why.
My setup has 3 devices: 1 NAS (always on) and 2 laptops. Assume I start with one shared folder (Send & Receive on all 3 devices), all 3 are powered on and fully synced.
Then shutdown SecondLaptop, & work on the document in MainLaptop.
Then turn SecondLaptop back on. I would expect the updates that were made on MainLaptop to be synced to SecondLaptop, but instead, there’s a conflict. Considering that the file hasn’t been touched anywhere else, I don’t understand why. If someone is editing files on MainLaptop while someone else is repeatedly rebooting SecondLaptop (but not touching any files at all), I’ll end up with a huge pile of conflict files.
somefile.docx will be the updated (correct) content, as edited on MainLaptop
somefile.sync-conflict-MAIN_LAPTOP_ID.txt will be out-of-date content
Is there a way these constant conflicts can be avoided?
Things like word documents are not simple text files, I wonder if windows does weird things with them, indexing for search purposes etc, which I guess might change the files metadata, and trigger a conflict?
I suggest you try to reproduce this with a simple text file.
Actually, I’d like to revise - I can repro this sometimes even when both systems are on. Here’s a video showing exactly. I just have 2 PCs sitting next to each other, all are in sync. I edit on one, conflict. I delete the conflicting file and try to edit again. Conflict. The file hasn’t been touched anywhere else.
Maybe it’s got something to do with permissions? You seem to be using Windows and some kind of a Linux distribution on the other side. What if you tick the “Ignore Permissions” box in the folder settings on both sides?
Conflicts arise when files are modified not only on one device, but on multiple devices before any Sync is running. Since you only change files on one computer, the objection with e.g. the indexing is possible.
In this respect, also the demonstration in the video could be just as tricky because the text file in question is kept open on the target computer.
Have you tried the same by not turning off the computer, but just stopping or quitting Syncthing and then starting it again? In this way, we might be able to see if the operating system changes anything as a result of such on/off operations before.
Or perhaps have the caption say something like “If you get unexpected conflicts, try enabling this” or something to that effect. Or maybe even have that option enabled by default? Seems like it may be more trouble than it’s worth. Just a thought.
This would not be helpful, since principaly it would not prevent the creation of conflict files.
I must add that I have also had conflict files in the past. However, I found that all non-conflict files were fine for me. I have therefore on all my devices and folders already set the parameter “Max Conflicts” to 0 a longer time ago. Since then I have of course no more conflict files, thereby also no problems, but in particular nevertheless no wrong versions of files in circulation.
Which would not be helpful? Enabling it by default, or saying “If you get unexpected conflicts, try enabling this”? Certainly seems like both would’ve been in my case.
I must add that I have also had conflict files in the past. However, I found that all non-conflict files were fine for me. I have therefore on all my devices and folders already set the parameter “Max Conflicts” to 0 a longer time ago.
To me that definitely sounds like a bad idea, as there are cases where conflicts are real. e.g. their intended use: something is accidentally edited in two places. I’ve had that happen, so having “real” conflicts visible is still very valuable/important. Just don’t want the “non-real” conflicts (i.e. like in the vid shown above).
Changing old, existing defaults is always tricky . However, I will say that I myself have always ignored permissions in my folders basically universally, as a) I never found a valid reason to even try syncing them, and b) I wanted to eliminate any potential cross-platform issues from the get-go.
Yeah, I get that. Maybe a good idea would be to at least have this under “General” tho, with a more clear note like “If using Syncthing to syncing across different platforms, enabling this may avoid false conflicts.”
Currently it’s not only off by default, but also buried as the last option under the “Advanced” tab, which is often thought of as “don’t mess with it.” Also, it currently says “Useful on systems with nonexistent or custom permissions” - NTFS has permissions, & mine aren’t custom, nor is NTFS mentioned in the list, so I figured it should be fine. So perhaps it’s just a matter of clarity - that’s my 2c. If it had said something to the effect of “conflicts may arise from cross-platform syncs unless you enable this,” I would’ve gone straight there
In principle, I agree with you, you can’t generalize either. Therefore, everyone should check in his environment, how the conditions work. I have not had any problems with this setting so far.
I have different platforms in operation: Windows 10+11, Android 9+11, Linux Mint, various Synology servers also with Linux. On all platforms, except Windows, I have “Ignore permissions” enabled, otherwise errors occur. And on Windows it surely works, I had already tested both and didn’t notice any difference.