-
Notifications
You must be signed in to change notification settings - Fork 147
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
Panic when deleting a table that was opened #715
Comments
2 tasks
Wow, this was fast! Thank you 🙏 |
For sure! |
github-merge-queue bot
pushed a commit
to n0-computer/iroh
that referenced
this issue
Nov 7, 2023
## 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 - [x] Self-review. - [x] Documentation updates if relevant.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
when deleting a table in a transaction where the table was also opened, redb panics with
Example:
I was quite surprised by this. Can this be made into an error instead of panicking? We'd quite like redb to not panic. And if it is expected behavior, should it be added to the docs that
WriteTransaction::delete_table
may not be called on tables that are opened in the same transaction.In iroh we have a database migration that moves values from a
table-old
into atable-new
, and then deletestable-old
. It looks roughly like this, and we'd preferably run this in a single transaction for idempotency. Am I missing something or is this not possible?The text was updated successfully, but these errors were encountered: