because we need to make sure we only rollback the transaction if the transaction is not committed, or rollbacked already, otherwise the db will :boom: