commit eeb918e1b9c27d3b5f0747cb856a4a8483f636ad
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat Mar 5 14:34:40 2022 +0000
Add the corresponding DB context to all SQL transactions
The goal of this patch is to make the Neutron code compliant
with SQLAlchemy 2.0.
All SQL transactions must be executed inside an explicit
writer/reader context. SQLAlchemy no longer will create an
implicit transaction if the session has no active transaction.
A warning message, only available in debug mode, is added. When
an ORM session calls "do_orm_execute", if there is no active
transaction, a warning message with a traceback will be logged
to help to debug the regression introduced.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/833247 /opendev. org/openstack/ neutron/ commit/ eeb918e1b9c27d3 b5f0747cb856a4a 8483f636ad
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit eeb918e1b9c27d3 b5f0747cb856a4a 8483f636ad
Author: Rodolfo Alonso Hernandez <email address hidden>
Date: Sat Mar 5 14:34:40 2022 +0000
Add the corresponding DB context to all SQL transactions
The goal of this patch is to make the Neutron code compliant
with SQLAlchemy 2.0.
All SQL transactions must be executed inside an explicit
writer/reader context. SQLAlchemy no longer will create an
implicit transaction if the session has no active transaction.
A warning message, only available in debug mode, is added. When
an ORM session calls "do_orm_execute", if there is no active
transaction, a warning message with a traceback will be logged
to help to debug the regression introduced.
Related-Bug: #1964575
Change-Id: I3da37fee205b8d 67d10673075b913 0147d9eab5f