-
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
Implement a lotus-shed migration command to migrate existing indexes to chain indexer #12408
Comments
Right now @aarshkshah1992 and I are thinking that lotus-shed is the best place for this to live, for a few reasons:
All that being said, we may end up deciding this isn't a great idea and the migration should be inline during the upgrade. Perhaps if we couple it with new GC settings then migration doesn't have to be expensive at all because we only migrate the data after where a GC would delete your data anwyay. So for now, lotus-shed is a good place to work on this, we may end up moving it in to the main daemon process later if we decide that's a better strategy. |
In a call with @aarshkshah1992, we decided to go with the It will start from the chain head and start backfilling to the new |
@rvagg Basically, we want to use the chain store/chain state to "migrate" rather than using the existing Indices to migrate. This is because the existing Indices might have a lot of entries for which the corresponding state has already been GC'd and also the DDLs don't map 1:1 nicely to the new DDL. Using the chainstore/chainstate as the source of truth for migrating/backfilling the Indices makes more sense and will get us a consistent Index. |
Checklist
Ideas
.Lotus component
What is the motivation behind this feature request? Is your feature request related to a problem? Please describe.
According to the discussion in #12293 and changes in PR, the decision was made to remove the fragmented indexes (msg, txhash, events) and create a single index (ChainIndexer). Therefore, we need to migrate the existing indexes to ChainIndexer.
Describe the solution you'd like
Create a
lotus-shed migration command
to migrate all the existing indexes toChainIndexer
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: