RUM-16501: Make file write atomic#3476
Conversation
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
/ddci trigger |
|
View all feedbacks in Devflow UI.
Tasks sourcing running asynchronously in workflow devflow:c928ba52-e583-413b-99fa-e7f74ee950df_46:019e69f2-115c-7c12-a979-e65a20700554 under run id 019e69f2-4e13-702f-b7c2-b16156ad8d0b |
This comment has been minimized.
This comment has been minimized.
0e8aa24
9493555 to
0e8aa24
Compare
0e8aa24 to
a35f4be
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #3476 +/- ##
===========================================
+ Coverage 72.28% 72.39% +0.11%
===========================================
Files 964 964
Lines 35561 35576 +15
Branches 5922 5926 +4
===========================================
+ Hits 25703 25753 +50
+ Misses 8250 8234 -16
+ Partials 1608 1589 -19
🚀 New features to boost your workflow:
|
What does this PR do?
We may have a write failure, leading to the corrupted TLV block. This makes further read fail.
This PR makes file write atomic: we will try to rollback to the previous state if write failed.
The approach used is basically to record the original file size and truncate to that mark if write fails. It should work fine even if there is not enough space on the disk.
This change doesn't cover the situation when there is a process death, such case is harder to deal with. Maybe this change will be enough to get rid of majority read errors.
Performance impact
Review checklist (to be filled by reviewers)