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

Possible data loss on update with different content type. #1584

Open
damooo opened this issue Mar 4, 2023 · 1 comment
Open

Possible data loss on update with different content type. #1584

damooo opened this issue Mar 4, 2023 · 1 comment
Labels
☀️ enhancement New feature or request

Comments

@damooo
Copy link
Contributor

damooo commented Mar 4, 2023

When one try to update representation of a resource to a new one with different content-type, the operation is prone to data-loss when using fs-accessor.

It first removes file corresponding to previous rep wityh out backup here:

await this.verifyExistingExtension(link);

Then performs many fallible operations of writing metadata, and new data, etc. Failing of any one effectively deletes old rep, with out updating.

@joachimvh
Copy link
Member

Not sure why we did it in that order. Could perhaps be something to do with potential conflicts in the underlying resource mapper. But if possible it would indeed be better to reverse the order. Still potentially has issues but lower chances of data loss if something goes horribly wrong.

@joachimvh joachimvh added the ☀️ enhancement New feature or request label Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☀️ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants