heat/heat/db/sqlalchemy
Zane Bitter 0abf43535d Don't use wrap_db_retry on subtransaction in resource_create_replacement()
The wrap_db_retry decorator must be used outside the outermost DB
transaction. Using it on a subtransaction means that the main
transaction gets marked for rollback but not closed, leaving the session
in the 'inactive' state.

This change ensures that the decorator is not used when we update the
previous resource from within a subtransaction as part of creating a
replacement resource, and instead the retry happens outside the main
transaction.

Change-Id: I28bfcc43b108d4d907098b2f0cf3553aab399553
Task: 36957
(cherry picked from commit 2398191be9)
2019-10-18 15:30:01 +00:00
..
migrate_repo Switch to use opendev.org 2019-04-22 09:36:50 +05:30
__init__.py Stub out the database access API 2012-03-29 18:02:16 +02:00
api.py Don't use wrap_db_retry on subtransaction in resource_create_replacement() 2019-10-18 15:30:01 +00:00
filters.py replace dict.iteritems() with six.iteritems(dict) 2014-08-06 10:56:09 +08:00
migration.py Squash database patches 2017-03-14 15:52:46 +08:00
models.py Remove db api and tables for CloudWatch 2018-01-28 09:35:07 +05:30
types.py Remove usage of sqlalchemy mutables 2015-06-26 11:02:03 +02:00
utils.py Replace retrying with tenacity 2016-11-15 04:34:17 +00:00