Add comment to instance_destroy()
The instance_actions and instance_actions_events tables are handled differently than most when we soft-delete an instance. It's not immediately obvious why this is, so let's add a comment explaining what's going on. Change-Id: Ie353650861c2911e4f55628c55f049fc1756e591
This commit is contained in:
parent
ded8170d0e
commit
f1cf1de00f
|
@ -1885,6 +1885,11 @@ def instance_destroy(context, instance_uuid, constraint=None):
|
||||||
resource_id=instance_uuid).delete()
|
resource_id=instance_uuid).delete()
|
||||||
context.session.query(models.ConsoleAuthToken).filter_by(
|
context.session.query(models.ConsoleAuthToken).filter_by(
|
||||||
instance_uuid=instance_uuid).delete()
|
instance_uuid=instance_uuid).delete()
|
||||||
|
# NOTE(cfriesen): We intentionally do not soft-delete entries in the
|
||||||
|
# instance_actions or instance_actions_events tables because they
|
||||||
|
# can be used by operators to find out what actions were performed on a
|
||||||
|
# deleted instance. Both of these tables are special-cased in
|
||||||
|
# _archive_deleted_rows_for_table().
|
||||||
|
|
||||||
return instance_ref
|
return instance_ref
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue