Sync Fails To Be Reliable In In Certain Situations Involving 'rmdir'


coewar

Recommended Posts

We've used BTSync client on Windows for over a year.. updating it very slowly. It has been very reliable.

 

We have a process that pushes files to a subfolder under a synced folder to get distributed. What we have done for a long time is to 'copy' files into a temp folder (still in the synced area), then 'move' the subfolder to rename it, then 'move' the temp folder to rename it to the original name.

 

We do it this way to have an instant switch to the new files and also to make sure if files were removed they don't linger. This has worked very well, throughout versions of BTsync, and even now I think on build 1.3.109 it's working fine. 

 

However I have found a problem that causes the sync to break on this particular subfolder and create funny file names like with short names, and for a brief period they'll also be .!sync extensions. Names like this: AU19E3~1.BAT

 

Around the time I noticed this (we had build 1.3.109 running on all servers), I changed the method of our directory push to instead of using:

- move folder folder-old

- move folder-temp folder

- rmdir folder-old

I had it do this:

- rmdir folder

- move folder-temp folder

 

I started seeing funky stuff when this ran and even when I deleted folders manually on all servers. Before waiting for BTSync to finish syncing on all servers, I ran the process and then files started deleting from it!  I then tried again, waited for BTSync to report it was done syncing, and tried again. It only took a few more runs for it to mess up again.

 

I reverted back to my original 'move' 'move' 'move' pattern and it's working fine again.

Though this time I'm using a temp location that is outside of the synced folder to avoid BTSync from quickly trying to sync the temp folders.

 

Anyway..  it's a very odd thing that might not be easy to test for.. but there is definitely something wrong on how it handles deleting files and replacing files with the same name very quickly.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.