You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a check during startup to ensure that the database version is not
dirty (i.e., the last migration did not complete successfully). If it is
dirty, the application will exit with an error.
This is done to resolve a bug that would occur when the **latest**
migration failed. In that scenario, the database version would correctly
be marked as dirty and exit with an error. However, under `sqlite`
database backends, when `tapd` was restarted, the dirty database version
would never be checked and `tapd` would start up normally, despite the
database being in a dirty state.
This is due to the check here: https://github.com/lightninglabs/taproot-assets/blob/0ddb08670f59e41e7edb2925a49df18d2124598e/tapdb/sqlite.go#L206-L213
In that scenario, since no migration is needed the migrate library is
never called to perform any potential migration. And since the dirty
check is normally done in the migrate library during a migration, it is
never performed in that scenario.
0 commit comments