Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data loss when switching on VFS for .owncloud files #7557

Closed
HanaGemela opened this issue Oct 25, 2019 · 10 comments
Closed

Data loss when switching on VFS for .owncloud files #7557

HanaGemela opened this issue Oct 25, 2019 · 10 comments
Assignees
Labels
Discussion feature:vfs native virtual files and placeholder implementation p3-medium Normal priority type:bug
Milestone

Comments

@HanaGemela
Copy link
Contributor

Similar to #6953

Client: 2.6.0rc2 (build 12577)
Server: 10.3.0 stable
macOS 10.15

Steps to recreate:

  1. upload the below files on the server
test
test.owncloud
test.owncloud.owncloud
  1. sync them to the client
  2. turn on VFS
  3. Account tab -> three dots menu -> availability -> free up local space
  4. Force sync

Actual files: One file is gone from the client, one file has lost its content, the third file test.owncloud.owncloud remain the same
Expected result: No data loss

@HanaGemela HanaGemela added type:bug p3-medium Normal priority labels Oct 25, 2019
@HanaGemela HanaGemela added this to the 2.6.1 milestone Oct 25, 2019
@ogoffart
Copy link
Contributor

I wouldn't call that as data loss since the data is still on the server and you get the data back if you turn off VFS again

@ogoffart
Copy link
Contributor

ogoffart commented Oct 28, 2019

When having files on the server named with the VFS extention, they are not properly synchronized to the client when using VFS. I'd say it is an expected limitation. I'm not sure what to do. I guess it should at least appear in the "not synchronized" (Edit: it does appear in that tab)

@jnweiger
Copy link
Contributor

#7556 has a reproducer for the data-loss. We start with three files, then we have two files. I don't think that switching off VFS afterwards can recreate the third file.

@ogoffart
Copy link
Contributor

@jnweiger I tried and it always does re-create the file.

@ogoffart
Copy link
Contributor

So what should we do?

Suggestion:

  1. If we detect such case, abort the sync and tell the user that virtual files cannot be enabled because there are files that ends with .owncloud in the sync directory.

  2. Immediatly remove all the files that ends with .owncloud, as they are bining ignored from now on.

  3. Leave it as is: the .owncloud files are no longer synchronized, but they are also ignored. They can also be overwritten by an actual placeholder, which could be considered a dataloss if the file is not on the server.

  4. Leave it almost as it, but do not overwrite existing file with a placeholder. Dehydrating or creating new placeholder for files with content would result as an error.

@HanaGemela
Copy link
Contributor Author

Suggestion number 1 is the most user friendly as it explains to the user what is going on and there are no surprises or wrong assumptions what will happen to .owncloud files.
Basically I like the idea of having a message telling the user what turning on VFS means for .owncloud files

ogoffart added a commit that referenced this issue Oct 30, 2019
For issue #7557 and #7556

Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
@ogoffart
Copy link
Contributor

I actually went for option 4. in #7562
There is still an error message that explains the problem in the not sync'ed dialog.

ogoffart added a commit that referenced this issue Oct 30, 2019
For issue #7557 and #7556

Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
ogoffart added a commit that referenced this issue Nov 1, 2019
For issue #7557 and #7556

Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
ogoffart added a commit that referenced this issue Nov 1, 2019
For issue #7557 and #7556

Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
guruz pushed a commit that referenced this issue Nov 3, 2019
For issue #7557 and #7556

Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
@butonic butonic added feature:vfs native virtual files and placeholder implementation and removed feature:vfs native virtual files and placeholder implementation labels Nov 15, 2019
@michaelstingl michaelstingl added the feature:vfs native virtual files and placeholder implementation label Nov 15, 2019
@michaelstingl michaelstingl modified the milestones: 2.6.1, 2.6.2 Nov 26, 2019
@HanaGemela
Copy link
Contributor Author

Files are not deleted but they are ignored now in 2.6.1sprint2 (build 12978), macOS 10.15.2

Screenshot 2020-01-09 at 11 23 13

@HanaGemela
Copy link
Contributor Author

@TheOneRing

@jnweiger
Copy link
Contributor

jnweiger commented Jan 15, 2020

"Ignored" is not bad in this case. That is in sync with the fix we have for #7556 and solution 4) above.

I'd like to suggest a slight variant of that solution:

4a) Leave it almost as it, but do not overwrite existing file with a placeholder. Dehydrating or creating new placeholder for files with content should

  • first, move the existing file out of the way by renaming as in the file conflict case.
  • then, we dehydrate normally.

@michaelstingl michaelstingl modified the milestones: 2.6.2, 2.6.3 Feb 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion feature:vfs native virtual files and placeholder implementation p3-medium Normal priority type:bug
Projects
None yet
Development

No branches or pull requests

7 participants