Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

MemIAVL should resume snapshot creation after restart#107

Closed
yzang2019 wants to merge 21 commits into
mainfrom
yzang/resume-snapshot-creation
Closed

MemIAVL should resume snapshot creation after restart#107
yzang2019 wants to merge 21 commits into
mainfrom
yzang/resume-snapshot-creation

Conversation

@yzang2019

Copy link
Copy Markdown
Collaborator

Describe your changes and provide context

Testing performed to validate your change

@codecov

codecov Bot commented Sep 17, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 45.80153% with 142 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.52%. Comparing base (de1d7fe) to head (48030a9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sc/memiavl/db.go 25.61% 79 Missing and 11 partials ⚠️
sc/memiavl/snapshot.go 52.85% 22 Missing and 11 partials ⚠️
sc/memiavl/snapshot_resume.go 73.23% 13 Missing and 6 partials ⚠️

❌ Your patch check has failed because the patch coverage (45.80%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
- Coverage   63.68%   62.52%   -1.17%     
==========================================
  Files          28       29       +1     
  Lines        4045     4285     +240     
==========================================
+ Hits         2576     2679     +103     
- Misses       1170     1282     +112     
- Partials      299      324      +25     
Files with missing lines Coverage Δ
sc/memiavl/snapshot_resume.go 73.23% <73.23%> (ø)
sc/memiavl/snapshot.go 56.16% <52.85%> (+0.24%) ⬆️
sc/memiavl/db.go 51.87% <25.61%> (-6.40%) ⬇️

... and 1 file with indirect coverage changes

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

Comment thread sc/memiavl/snapshot.go
if err != nil {
return err
}
defer f.Close()

Check warning

Code scanning / CodeQL

Writable file handle closed without error handling Warning

File handle may be writable as a result of data flow from a
call to OpenFile
and closing it may result in data loss upon failure, which is not handled explicitly.
Comment thread sc/memiavl/multitree.go

// Log progress every 1000 entries or at completion
if replayCount%1000 == 0 || replayCount == int(totalEntries) {
progressPercent := float64(replayCount) / float64(totalEntries) * 100

Check notice

Code scanning / CodeQL

Floating point arithmetic Note

Floating point arithmetic operations are not associative and a possible source of non-determinism
Comment thread sc/memiavl/multitree.go

// Log progress every 1000 entries or at completion
if replayCount%1000 == 0 || replayCount == int(totalEntries) {
progressPercent := float64(replayCount) / float64(totalEntries) * 100

Check notice

Code scanning / CodeQL

Floating point arithmetic Note

Floating point arithmetic operations are not associative and a possible source of non-determinism
@yzang2019 yzang2019 closed this Sep 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants