mastodon-sc / mastodon

Mastodon – a large-scale tracking and track-editing framework for large, multi-view images.
BSD 2-Clause "Simplified" License
69 stars 20 forks source link

Increase File integrity during file saving #310

Closed stefanhahmann closed 4 months ago

stefanhahmann commented 5 months ago

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

Related to #298

tinevez commented 5 months ago

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

stefanhahmann commented 5 months ago

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 commented 4 months ago

Resolved via #311