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 on fork over moved file #132

Open
madadam opened this issue Jul 6, 2023 · 0 comments
Open

Data loss on fork over moved file #132

madadam opened this issue Jul 6, 2023 · 0 comments

Comments

@madadam
Copy link
Collaborator

madadam commented Jul 6, 2023

Consider two replicas A and B:

  1. A creates a file
  2. B syncs and merges with A
  3. Concurrently:
    • A renames / moves the file
    • B updates the file
  4. A syncs with B and starts to merge

The merge proceeds normally because there is no corresponding entry in A's branch (there is only a tombstone after the file was moved). However, as merge preserves blob ids, the merge begins to overwrite the renamed file, resulting it data loss.

Ideas for fix:

  • When this situation occurs, generate a new blob_id for the dst file of the merge
  • Always generate new blob_id on move/rename
  • Something else ...

Related to #70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant