-
Notifications
You must be signed in to change notification settings - Fork 9
Check DB Script fix, open DB without readonly flag #315
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
Conversation
piersy
left a comment
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.
All looks good
| return fmt.Errorf("failed to close db in readwrite mode: %w", err) | ||
| } | ||
|
|
||
| ancientDB, err := NewChainFreezer(filepath.Join(opts.dbPath, "ancient"), "", true) |
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.
With this change can we change how we open the db for the pre and full migrations, which are currently not using readonly.
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.
In theory, but if we ever run those scripts without the continuity script before them for whatever reason they'll have this problem. It would be creating a hard dependency between the scripts. What do you think about that tradeoff?
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.
Oh I was thinking the open/close step came before all flows. Not a big issue.
piersy
left a comment
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.
This should be rebased onto, the celo-rebase-12 branch before being merged
4075779 to
1a17d82
Compare
1a17d82 to
5985c1a
Compare
The optimism codebase expects there to be a certain type of file suffixed by
.metain the db that does not exist in our legacy dbs from cel1. These files are automatically created when we open the db in read/write mode using the optimism codebase, but not when we open in readonly mode. So, we need to add this change or else the script will fail when run on a legacy celo db for the first time.I didn't detect this earlier because the datadirs I've been testing the continuity script with locally already had the
.metafiles createdThis came up in testing for celo-org/celo-l2-node-docker-compose#32