I know recently there was a bug for this however, is there not a better way to perform renames?
As it stands, if one of our users moves a folder that another user is currently editing a file in, it disappears for everyone else as expected except one user that was still editing a file in that folder then Sync never finishes because the device that was using that folder is now trying to save the file to that directory.
All devices then begin splurting out:
dst stat dir: GetFileAttributesEx C:\*****\General: The system cannot find the file specified.
When I then create the folder the messages change to:
pull: no available source device
But no one will have that folder now because SYncthing has successfully removed it from all devices so this error is going to remain forever unless I find the same file that was in it before…
How did it behave before though?
Unfortunately I didn’t test this scenario beforehand. The only reason it’s cropped up now is because of the constant error messages being thrown up on all devices.
I’ve managed to find the same file and created the old directory and placed it in however I’m still getting the error:
[AAW47] 2015/02/02 14:02:00.827463 sharedpullerstate.go:172: INFO: Puller (folder “default”, file “******\General\FW ******.msg”): pull: no available source device
So I don’t think that the change in renaming caused this, as it should have behaved the same way.
I think it’s more of a race condition where A deletes/moves something, and B edits it, then it’s not deterministic which action wins in the sense of cluster, causing a conflict which are not resolved.
The way to recover from this is to add the file back, and touch it to bump the mtime, causing everyone to accept the return of the file.
Let me know if this helps.
@AudriusButkevicius yes I do think that this behaviour would have been present before that issue was closed. I just didn’t come across it.
Touching the file has resolved the issue.
I do think this scenario needs more work though when you can.
Well there is a ticker for that, somewhere in the 200’s, so it’s something we are definitely aware of.