storagenode/storagenodedb: fix closing in-use database
Migration step was closing a database that was used by the migration itself. There is an active tranasction over the database. Instead of closing in the same transaction we can wait until restart for the database cleanup. Change-Id: Ic971d8cea81a3ab783f4a1bdc6357009c8b31386
This commit is contained in:
parent
1abfe42142
commit
7bc76624cf
@ -967,16 +967,6 @@ func (db *DB) Migration(ctx context.Context) *migrate.Migration {
|
||||
return ErrDatabase.Wrap(err)
|
||||
}
|
||||
|
||||
// Close the deprecated db in order to free up unused
|
||||
// disk space
|
||||
if err := db.closeDatabase(DeprecatedInfoDBName); err != nil {
|
||||
return ErrDatabase.Wrap(err)
|
||||
}
|
||||
|
||||
if err := db.openDatabase(DeprecatedInfoDBName); err != nil {
|
||||
return ErrDatabase.Wrap(err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user