Crash can corrupt JSON metadata file #13
Labels
No labels
bug
duplicate
enhancement
enhancement/backup
help wanted
idea
invalid
question
story
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Chewing_Bever/alex#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. 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.