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

Increase File integrity during file saving #310

Closed
stefanhahmann opened this issue Jun 7, 2024 · 3 comments
Closed

Increase File integrity during file saving #310

stefanhahmann opened this issue Jun 7, 2024 · 3 comments
Assignees

Comments

@stefanhahmann
Copy link
Collaborator

stefanhahmann commented Jun 7, 2024

User Story

A user of Mastodon recently reported that his *.mastodon file was corrupted after/during a crash of Fiji/Mastodon that perhaps was related to #295. It is not exactly clear how *.mastodon could get corrupted and currently no reproducible workflow exists that would create such a corrupt file. However, the result for the user is annoying, since if no other backup strategy existed potentially many hours of tracking may be lost.

Potential solution

  • When saving the mastodon project file, it is first saved to projectname_pending.mastodon
  • When saving to this file was successful, projectname.mastodon get overwritten with projectname_pending.mastodon
  • This would ensure that the actual project file is only overwritten, when the saving process was successful and not interrupted

Related to #298

@tinevez
Copy link
Contributor

tinevez commented Jun 7, 2024

I think it is a good solution. Are we sure that the crash happened during saving?

@stefanhahmann
Copy link
Collaborator Author

I think it is a good solution. Are we sure that the crash happened during saving?

No, we are not sure. It was not possible to reproduce the case that a corrupted mastodon file got created.
However, we assume the reason for a saved mastodon file getting corrupted, if something happens during the process of saving.

On my machine I can produce saving times ranging from ~0,2s to ~2s (depending on project size, attributes, etc.). Not very long, but long enough to kill mastodon during the saving process.

@stefanhahmann stefanhahmann self-assigned this Jun 7, 2024
@stefanhahmann stefanhahmann changed the title Increase Integrity during file saving Increase File integrity during file saving Jun 7, 2024
@stefanhahmann
Copy link
Collaborator Author

Resolved via #311

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

No branches or pull requests

2 participants