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

Do not panic when blob does not have all pieces yet #563

Merged
merged 7 commits into from
Sep 13, 2023
Merged

Conversation

adzialocha
Copy link
Member

@adzialocha adzialocha commented Sep 12, 2023

This PR fixes a race condition where nodes would sometimes crash when they attempted to materialise a blob where not all pieces are in the database yet (for example during replication). This was solved by:

  1. Not failing critically on this error
  2. Moving the check if all pieces are given right at the beginning of the method

Closes #562

📋 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Patch coverage: 64.81% and project coverage change: -0.68% ⚠️

Comparison is base (966774a) 92.35% compared to head (f773516) 91.67%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #563      +/-   ##
==========================================
- Coverage   92.35%   91.67%   -0.68%     
==========================================
  Files         106      106              
  Lines       17835    17980     +145     
==========================================
+ Hits        16471    16484      +13     
- Misses       1364     1496     +132     
Files Changed Coverage Δ
aquadoggo/src/db/errors.rs 0.00% <ø> (ø)
aquadoggo/src/materializer/tasks/blob.rs 46.25% <18.18%> (-12.22%) ⬇️
aquadoggo/src/db/stores/blob.rs 79.49% <76.74%> (-18.90%) ⬇️

... and 2 files with indirect coverage changes

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

@sandreae sandreae merged commit d2cf257 into main Sep 13, 2023
10 checks passed
@adzialocha adzialocha deleted the fix-pieces-issues branch September 19, 2023 14:47
adzialocha added a commit that referenced this pull request Sep 19, 2023
* main:
  Update version in Cargo.lock as well
  Do not panic when blob does not have all pieces yet (#563)
  Make cli version reflect the crate version
  One hash is enough when releasing binaries
  Remove unused methods from `EntryStore` (#560)
  Fix: dedup generated schema fields by key (#558)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node crashes when receiving blob
2 participants