Skip to content
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

feat(store): correct corrupted files on write #3859

Merged
merged 11 commits into from
Oct 22, 2024

Conversation

walldiss
Copy link
Member

@walldiss walldiss commented Oct 17, 2024

This PRs adds corruption detection to store. Corrupted files are detected by checking if their length is corresponding to expected file size. There is no content inspection for files verification yet, but it can be added via datahash compute. Added support for:

  • ODSQ4 file
  • ODS file

@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 66.32653% with 33 lines in your changes missing coverage. Please review.

Project coverage is 45.09%. Comparing base (2469e7a) to head (2449ffc).
Report is 351 commits behind head on main.

Files with missing lines Patch % Lines
store/store.go 58.13% 12 Missing and 6 partials ⚠️
store/file/ods.go 76.92% 4 Missing and 2 partials ⚠️
store/file/q4.go 68.42% 4 Missing and 2 partials ⚠️
store/file/ods_q4.go 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3859      +/-   ##
==========================================
+ Coverage   44.83%   45.09%   +0.25%     
==========================================
  Files         265      314      +49     
  Lines       14620    21902    +7282     
==========================================
+ Hits         6555     9876    +3321     
- Misses       7313    10990    +3677     
- Partials      752     1036     +284     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

store/store.go Outdated Show resolved Hide resolved
store/file/ods.go Outdated Show resolved Hide resolved
store/file/ods.go Outdated Show resolved Hide resolved
Wondertan
Wondertan previously approved these changes Oct 21, 2024
Copy link
Member

@Wondertan Wondertan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing readability nits

vgonkivs
vgonkivs previously approved these changes Oct 21, 2024
@walldiss walldiss dismissed stale reviews from vgonkivs and Wondertan via c248141 October 21, 2024 14:47
Copy link
Contributor

@cristaloleg cristaloleg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

Copy link
Member

@vgonkivs vgonkivs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@walldiss walldiss enabled auto-merge (squash) October 22, 2024 10:32
@walldiss walldiss merged commit 4f1f14a into celestiaorg:main Oct 22, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:storage kind:feat Attached to feature PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants