-
Notifications
You must be signed in to change notification settings - Fork 973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(store): check if link exists on write #3844
fix(store): check if link exists on write #3844
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3844 +/- ##
==========================================
+ Coverage 44.83% 46.56% +1.73%
==========================================
Files 265 314 +49
Lines 14620 18142 +3522
==========================================
+ Hits 6555 8448 +1893
- Misses 7313 8679 +1366
- Partials 752 1015 +263 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It asks for a test
For context: shwap-robus network has a few blocks missed in the storage, and the hypothesis is that they were missed during OOM leaving the Store in an inconsistent state(file exists, but link for it does not). This covers this possibility and we are yet to prove this is an issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
In case of unexpected shutdown file might be partially written, while link is not. This PR will ensure we that put will result in both link and file on success.
File validation will be tackled in another PR