-
Notifications
You must be signed in to change notification settings - Fork 240
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
Problem: versiondb don't support restore from local snapshot #1108
Conversation
to setup a pruned versiondb node, we need to restore versiondb from local snapshot. Solution: - implement a new subcommand for that.
defer batch.Destroy() | ||
|
||
var ts [TimestampSize]byte | ||
binary.LittleEndian.PutUint64(ts[:], uint64(version)) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
} | ||
}() | ||
|
||
return versionDB.Import(int64(height), ch) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
return err | ||
} | ||
|
||
snapshot, chChunks, err := store.Load(height, uint32(format)) |
Check failure
Code scanning / gosec
Potential integer overflow by integer type conversion
Signed-off-by: yihuang <huang@crypto.com>
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.
we can remove tempfile now
Codecov Report
@@ Coverage Diff @@
## main #1108 +/- ##
===========================================
+ Coverage 22.24% 46.19% +23.95%
===========================================
Files 47 82 +35
Lines 3044 7386 +4342
===========================================
+ Hits 677 3412 +2735
- Misses 2300 3612 +1312
- Partials 67 362 +295
|
Signed-off-by: mmsqe <mavis@crypto.com>
to setup a pruned versiondb node, we need to restore versiondb from local snapshot.
Solution:
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)