Description
What's the issue?
When updating files, we quite often use utilities such as `os.WriteFile`, internally this will open the file with the 'O_TRUNC' flag, then write the given data. This opens ourselves to issues where truncation succeeds, but the write fails (meaning it's possible to end up with partial/empty files).
What's the fix?
For "mission critical" files, we should use atomic operations, for example when updating the plan.
Attachments
Issue Links
- relates to
-
MB-48485 [CBM] Failed to resume backup with error ' (bucket0) (vb 867) Received an unexpected error from the sink callback, beginning teardown'
- Closed
-
DOC-8642 [CBM] Add documentation around 'hide dot files' on Samba
- Resolved
-
MB-45622 [CBM] Improve resilience to power outage/kill -9 scenarios
- Open