Skip to content
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

fix(mirror): migrate the source storage before opening it #8982

Merged
merged 2 commits into from
Apr 28, 2023

Conversation

marcelo-gonzalez
Copy link
Contributor

Just using near_store::NodeStorage::opener() without a migrator doesn't work if the DB version of the binary is newer than the database with the source chain transactions, which is pretty likely in practice. To fix it, we can mark nearcore::open_storage() as pub and just call that

Just using near_store::NodeStorage::opener() without a migrator
doesn't work if the DB version of the binary is newer than the database
with the source chain transactions, which is pretty likely in practice.
To fix it, we can mark nearcore::open_storage() as pub and just call that
@marcelo-gonzalez
Copy link
Contributor Author

also can't just use let migrator = migrations::Migrator::new(near_config); as-is like in nearcore::open_storage() because it's not a public struct. So in any case it looks like something needs to get made pub if we want to do this

@near-bulldozer near-bulldozer bot merged commit 7fa1757 into near:master Apr 28, 2023
marcelo-gonzalez added a commit to marcelo-gonzalez/nearcore that referenced this pull request May 3, 2023
Just using near_store::NodeStorage::opener() without a migrator doesn't work if the DB version of the binary is newer than the database with the source chain transactions, which is pretty likely in practice. To fix it, we can mark nearcore::open_storage() as pub and just call that
marcelo-gonzalez added a commit to marcelo-gonzalez/nearcore that referenced this pull request May 8, 2023
Just using near_store::NodeStorage::opener() without a migrator doesn't work if the DB version of the binary is newer than the database with the source chain transactions, which is pretty likely in practice. To fix it, we can mark nearcore::open_storage() as pub and just call that
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants