sync-conflicts

Introducers are about connecting devices, not sharing folders. if you have just the three and not often changing new ones, you don’t need it.

I see. An idea just came to my mind, regarding the file versions and how they are affected by reset. When the version is a simple number and if reset changes this number back to 1 this is risky, because even if a file on B is newer than A, changing the version to a lower value on B during a reset will make Syncthing prefer keeping the older version from A. This matches the behaviour I have observed. The way I would implement it is with two timestamps:

  • file hash - if that matches there is no conflict or change
  • last modified time
  • last indexed time
  • optionally version number with a lower priority

This will make syncing much more reliable, because even though in rare cases the time may not be the same across devices the index time provides a better estimate than a number witch might be reset, and devices can track the time differences between each other. Actually such a number may also be used, but it should have a lower priority. I’ve never seen a clock skew higher that 2 seconds between my devices. Devices can also notify each other: Hey my database got reset recently, but my last index time is T, so keep this in mind when making a choice that version to keep.

One think I love about the .stversions folder is that after two devices sync, I can quickly check what files were affected on each device. If everything is fine, I delete the folder. If anything looks wrong, I can investigate and take actions. My advice is to introduce a folder .stconflicts that will keep a track of conflicts. With the current implementation conflicts are much harder to track, because they are scattered among the huge tree of files, and it is not obvious which files were replaced on each device.

Yes, database resets are dangerous. you aren’t ment to go aroundcasually resetting it left and right. nothing needs to be done to improve this because the solution is simple: don’t do it.

If your setup is borked, do it everywhere at once, make sure everything is really in sync and/or use the send only feature to prevent syncing/conflicts and only change back to send receive once all is fine.

for the single conflict folder: that came up before, there might even be a feature request on GitHub about it.

1 Like

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