Crash can corrupt JSON metadata file #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.