-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: populate the index on snapshot import #10556
Conversation
92891df
to
51b3ec4
Compare
51b3ec4
to
59640a8
Compare
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.
overall lgtm, just a small comment.
chain/index/msgindex.go
Outdated
|
||
dbPath := path.Join(basePath, dbName) | ||
if _, err := os.Stat(dbPath); err == nil { | ||
return xerrors.Errorf("msgindex already exists at %s", dbPath) |
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.
maybe just delete it and recreate it?
Sounds like the right thing to do.
e757030
to
b8137f6
Compare
@vyzo I double checked and verified that the lotus daemon continues to populate and update the |
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.
a couple of small things.
Related Issues
Fixes: #10537
Proposed Changes
After importing from snapshot this PR creates and populates the sqlite message index introduced in #10452 from the 2k tipsets in the snapshot.
Additional Info
When loading from snapshot from mainnet, populating the message index takex approx 30 seconds. We should be able to lower this somewhat with bulk inserts (though doing it inside a transaction is at least an order of magnitude faster than not).
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps