Crash can corrupt JSON metadata file #13
Labels
No Label
Idea
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Chewing_Bever/alex#13
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
If an Alex instance crashes right when the JSON metadata file is being written, the file can end up being corrupted. This causes the Alex instance to instantly error out whenever it starts, as the metadata file is now invalid.
This issue can be fixed by first writing to a temporary file and then atomically renaming it to the JSON.
This does expose a larger issue where if crashes occur between when the tarballs are written and the metadata file is written, these can be out of sync.