Merge pull request #1128 from gradido/bugfix_transactions_alterAutoIncrAfterRollback

Changed the Auto increment so that it is done after the rollback and …
This commit is contained in:
Hannes Heine 2021-11-22 23:27:46 +01:00 committed by GitHub
commit e922a4895c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -613,9 +613,6 @@ export class TransactionResolver {
await queryRunner.commitTransaction() await queryRunner.commitTransaction()
} catch (e) { } catch (e) {
await queryRunner.rollbackTransaction() await queryRunner.rollbackTransaction()
throw e
} finally {
await queryRunner.release()
// TODO: This is broken code - we should never correct an autoincrement index in production // TODO: This is broken code - we should never correct an autoincrement index in production
// according to dario it is required tho to properly work. The index of the table is used as // according to dario it is required tho to properly work. The index of the table is used as
// index for the transaction which requires a chain without gaps // index for the transaction which requires a chain without gaps
@ -627,6 +624,9 @@ export class TransactionResolver {
// eslint-disable-next-line no-console // eslint-disable-next-line no-console
console.log('problems with reset auto increment: %o', error) console.log('problems with reset auto increment: %o', error)
}) })
throw e
} finally {
await queryRunner.release()
} }
// send notification email // send notification email
// TODO: translate // TODO: translate