Skip to content

feat(store): allow partial init #327

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

feat(store): allow partial init #327

wants to merge 2 commits into from

Conversation

Wondertan
Copy link
Member

@Wondertan Wondertan commented Jul 24, 2025

Previously, if either head or tail is not found for whatever reason, the store will report being empty, causing the node to reinitialize and sync from scratch. This change enables it to recover either the head or the tail if the other is missing. For example, if the tail is missing due to an interrupted delete, the head will be retrieved successfully upon start. The tail will then be recovered via the receding tail functionality. Although if the chain is too long, receding may take too long making it hard for the node to stop, thus #326

This was tested manually, but it still needs a unit test. It will happen in a separate PR

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 71.42857% with 8 lines in your changes missing coverage. Please review.

Project coverage is 53.93%. Comparing base (88c5b8c) to head (854b811).
Report is 76 commits behind head on main.

Files with missing lines Patch % Lines
store/store.go 71.42% 5 Missing and 3 partials ⚠️

❗ There is a different number of reports uploaded between BASE (88c5b8c) and HEAD (854b811). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (88c5b8c) HEAD (854b811)
2 1
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #327      +/-   ##
==========================================
- Coverage   62.80%   53.93%   -8.88%     
==========================================
  Files          39       39              
  Lines        3589     4439     +850     
==========================================
+ Hits         2254     2394     +140     
- Misses       1160     1864     +704     
- Partials      175      181       +6     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Wondertan Wondertan force-pushed the store-partial-init branch from 5898d26 to 069f58d Compare July 24, 2025 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants