db: Remove unnecessary session management
oslo.db will automatically rollback a session when used within a
transaction context manager. There's no need for us to do this handling
manually.
@@ -1503,7 +1503,7 @@ def quota_reserve(
project_id=None,
):
elevated = context.elevated()
- try:
+
if project_id is None:
project_id = context.project_id
@@ -1682,9 +1682,6 @@ def quota_reserve(
raise exception.OverQuota(
overs=sorted(overs), quotas=quotas, usages=usages
)
- except Exception:
- context.session.rollback()
- raise
return reservations
