heat/heat/db
Zane Bitter 7daa3bdbf3 Ignore errors in purging events
There is a known issue with purging the resource properties data for events
where the same resource properties data is referenced by a resource or
event in the backup stack.

It's more important that we are able to store a new event than that we are
able to purge old events, so catch any exceptions in purging and log an
error, rather than allowing the exception to abort the event creation.

Also use a transaction to ensure that we roll back the deletion of the
events when we encounter an error. This ensures that any resource
properties data *not* referenced by the backup stack is not orphaned
because of failures deleting other rows. This will allow us to properly
purge the database once the issue is fixed.

Change-Id: Iefa706f91382f7d1c47e09e8f67a9fad53a9390b
Story: #2002643
Task: 22334
(cherry picked from commit 6169ed4660)
2018-06-28 14:14:50 +00:00
..
sqlalchemy Ignore errors in purging events 2018-06-28 14:14:50 +00:00
__init__.py Do not initialize anything during import phase 2013-04-24 10:03:06 -07:00