-
Notifications
You must be signed in to change notification settings - Fork 159
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(iroh-sync): prevent panic in namespace migration #1775
Conversation
d71edad
to
aa23786
Compare
Ok(MigrateOutcome::Execute(entries)) | ||
} | ||
|
||
/// Delete the v1 namespaces table. | ||
fn migration_003_namespaces_delete_v1(tx: &WriteTransaction) -> Result<MigrateOutcome> { |
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.
can you add a comment why this is its own migration? this is quite surprising
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.
👍 added a commit with 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.
lgtm, modulu my one comment
Description
The migration as commited with #1770 panics when starting iroh with an existing data dir. The reason is that redb panics when deleting table in a transaction where they were opened as well. See: cberner/redb#715
This fixes this by moving the table deletion to a separate transaction.
The limitation and potential panic in redb was fixed in cberner/redb#716 so once we upgrade to the next (still unreleased) version of redb, this can be removed again.
Change checklist