Removing and re-adding a folder may cause data loss #3876
Removing and re-adding a folder causes a reset of the index for that folder and a rescan. Consider the following scenario, with two devices A and B:
Maybe not a super common scenario, but a folder can be removed by mistake and re-added, or because it's moved on disk, or for many other reasons.
Idea: should the short ID in the version vector not be based on our device ID, but instead a random ID assigned to the folder, e.g., our delta index ID?
I was about to submit a bug report about this, then read this issue. I ran into this very thing except in my case, I was moving files on "A", then the disk holding "B" failed (the syncthing config on both hosts was still intact.) So, I removed the folder on B's syncthing and readded it (B now contained partial contents restored), and the results can only be described as pandemonium... after an initial bit of resyncing, moving a file on B would sometimes result in the file instantly being deleted or moved to "sync-conflict", presumably because A's history last saw that file in that state. Thinking about it, it is hard to figure out what exactly should happen in cases like this, but "WTF" behavior is probably not the best. Even a workaround that would give you a warning at some point (maybe at the point there is a suspect folder added) would be preferable.
referenced this issue
Mar 30, 2017
What about just changing the version vector from:
Or is this one of those things that "fixes something only to break a bunch of other things". I'm guessing that's the case since no ones has mentioned such a simple solution.