-
Notifications
You must be signed in to change notification settings - Fork 941
db fail to upgrade due rune table migration #6770
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
Comments
Ok this looks like introduced in eacf0b5 |
@vincenzopalazzo The issue has already been discussed in #6700. It happened due to my rebase and merging confusion at db version 234. As suggested by @ddustin, the fix is: #6700 (comment) Let me know if anything else needs to be done about this or can we close it now. |
@ShahanaFarooqui Sorry but I am running 7bea339. It should contain the solution, but the bug still happens, so I understand the problem, but I do not understand what the fix is? In the PR that you link, there is the following assertion
It does not seem to be true(?) If you think that it is a duplicate I believe you, so please feel free to close it if I am not able to upgrade my node |
@vincenzopalazzo Thanks. I was able to reproduce it with current master branch. I will look into it now. Thank you for bringing it into my attention. |
…ElementsProject#6770 While rebasing the PR for per rune restriction, I unintentionally merged the `{SQL("ALTER TABLE runes ADD last_used_nsec BIGINT DEFAULT NULL"), NULL}` database alteration command ahead of {NULL, migrate_runes_idfix} (commit ElementsProject@eacf0b5#diff-1abcdf1b9d822b30079d6450b790274bdfb7c7fa04baa43ad2d9bd449865d4c9R978). `migrate_runes_idfix` was the 234th change (deployed with version 23.08.1) and adding the `last_used_nsec` column should have been the next (235th, added in current release) change. Due to this incorrect ordering, nodes updating from version 23.08.1 to the master branch will not add the `last_used_nsec` column as they should, and instead execute `migrate_runes_idfix` again, leading to the error in issue ElementsProject#6770. After the reordering, db_get_runes method also has to be fixed for only selecting rune NOT last_used_nsec. Because this column was added after `migrate_runes_idfix` calls it. I am tempted to change the method name from `db_get_runes` to `db_migrate_runes` for more clarity on its functionality though. Changelog-None.
…#6770 While rebasing the PR for per rune restriction, I unintentionally merged the `{SQL("ALTER TABLE runes ADD last_used_nsec BIGINT DEFAULT NULL"), NULL}` database alteration command ahead of {NULL, migrate_runes_idfix} (commit eacf0b5#diff-1abcdf1b9d822b30079d6450b790274bdfb7c7fa04baa43ad2d9bd449865d4c9R978). `migrate_runes_idfix` was the 234th change (deployed with version 23.08.1) and adding the `last_used_nsec` column should have been the next (235th, added in current release) change. Due to this incorrect ordering, nodes updating from version 23.08.1 to the master branch will not add the `last_used_nsec` column as they should, and instead execute `migrate_runes_idfix` again, leading to the error in issue #6770. After the reordering, db_get_runes method also has to be fixed for only selecting rune NOT last_used_nsec. Because this column was added after `migrate_runes_idfix` calls it. I am tempted to change the method name from `db_get_runes` to `db_migrate_runes` for more clarity on its functionality though. Changelog-None.
…lteration ElementsProject#6770" This reverts commit d9e3d3e.
I am running the current master but I can't upgrade the db
The text was updated successfully, but these errors were encountered: