Data Loss - Mixed Case Filesystems (Also "syncing Not Completing")


Recommended Posts

Hi.

I found a problem with Sync that can cause data loss. The problem is related to filesystems that don't distinguish upper/lower case characters in latin alphabet, and Sync handles this issue very bad. My short story: I had directory named 'xefis' and later, temporarily I created a file named 'XEFIS' with some links inside (purposely named the same with only case difference to remember that they're related). After a while my 'xefis' directory was all gone, only the 'XEFIS' file remained on all connected devices, and the "offending" one (Android) was unable to sync completely. Thank goodness, there was .sync/SyncArchive, but it also included old files, so I have a mess in my 'xefis' directory right now.

So some filesystems don't see any difference between file named 'x' and 'X'. If Sync runs on multiple platforms where on one this is allowed and on another it is not (say: Linux and Android with FAT SD card), so essentially Sync is trying to reconcile two worlds, which can not be done perfectly.

So if I have files 'x' and 'X' in the same directory, two things can be observed:

 

- Sync gets stuck with syncing,

- one of the files gets deleted everywhere (on all connected nodes).

  Luckily data is still in SyncArchive, but if one doesn't immediately notice this, he may lose his data forever.

 

What I would expect it to do:

 

- identify the problem (filename conflict) on systems where it happens (not everywhere, I think it's unnecessary)
- _not_ sync the conflicting files. If there's a conflict - do nothing, especially _do not replace or overwrite or delete_ one of conflicting files. Show a message instead, don't just stop syncing for unknown reasons.
Here I assumed that no-one wants to lose their data, but If there's anyone who would need such behavior (overwriting files), maybe implement it as an configuration option?

Please note that the problem is not really related to certain operating systems, but rather to the filesystems. As far as I know, it's possible to get POSIX-way of handling of file names on Windows, on the other hand being on Linux doesn't necessarily incur that case-distinguishing happens - Sync could be as well configured to work on a FAT filesystem under Linux (it can happen on Android). So the solution should be filesystem aware, not OS-aware.

Link to post
Share on other sites
  • 5 months later...

What I would expect it to do:

- identify the problem (filename conflict) on systems where it happens 

Sync already does that, since long ago, and adds .Conflict to filename

 

What I would expect it to do:

- _not_ sync the conflicting files. If there's a conflict - do nothing, especially _do not replace or overwrite or delete_ one of conflicting files. Show a message instead, don't just stop syncing for unknown reasons.

This is something team is planning to do 

Link to post
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.