Don't re-use resource-properties-data in backup stacks
When purging events we are only able to (efficiently) search for references to resource properties data from events and resources in the same stack. This results in foreign key constraint errors if the resource properties data is referenced from a backup stack. To avoid this, don't reuse resource properties data IDs after moving a resource between the backup and main stacks, but duplicate the data instead. Change-Id: I93329197c99a2dba37b0e1dbd7efe7b2b17bc036 Story: #2002643 Task: 22510
This commit is contained in:
parent
9709f71a86
commit
acd77dde9e
|
@ -734,6 +734,7 @@ class Stack(collections.Mapping):
|
|||
|
||||
def add_resource(self, resource):
|
||||
"""Insert the given resource into the stack."""
|
||||
resource._rsrc_prop_data_id = None
|
||||
template = resource.stack.t
|
||||
resource.stack = self
|
||||
definition = resource.t.reparse(self.defn, template)
|
||||
|
|
Loading…
Reference in New Issue