Issue 13178

Deletes need to cascade

Reporter: mdoering
Assignee: trobertson
Type: Bug
Summary: Deletes need to cascade
Description: When deleting an entity we only logically delete it by setting a delete timestamp. This either needs to cascade down (for example to datasets and their endpoints when an organization is deleted) or we need to honor the delete flags on the entire graph whenever we work on the lower pieces like endpoints or datasets.
Priority: Critical
Resolution: WontFix
Status: Closed
Created: 2013-05-17 13:33:18.096
Updated: 2013-12-16 17:50:21.838
Resolved: 2013-12-12 11:54:48.85

Created: 2013-05-17 14:09:00.636
Updated: 2013-05-17 14:25:26.703
Please be more specific with this.

The intended design of deletions is as follows:
- network entities are logically deleted, where the deleted timestamp is set
- contacts, tags etc may be physically deleted explicitly
- contacts, tags etc are not deleted on the logical deletion of a network entity (hence it may be "undeleted" and restored to original state)

Deletions of organizations should either:
 i) logically delete the hosted and owned datasets and installations. < Appears missing
 ii) update datasets to not have a host / owned as appropriate.  < Appears missing
Deletion of an installation should update datasets so they are not hosted by the installation. < Appears missing
Deletion of a Node should update organizations endorsed by that node to have a null endorsement.  < Appears missing


Created: 2013-05-17 14:14:13.895
Updated: 2013-05-17 14:14:13.895
The missing cascading delete you listed at the bottom of your comment is what I was thinking of, yes.


Created: 2013-11-22 11:02:59.874
Updated: 2013-11-22 11:02:59.874
As suggested in REG-455, the preferred (cautious) approach would be to prevent an organization from being deleted, until the organization has 0 owned datasets and 0 hosted datasets.

I would propose cascading deletes for nodes, organizations, and installations all be disallowed, and that we close this issue.

I have opened 2 additional issues to handle preventing cascading deleted on installations and Nodes:

1) REG-464: Installation deletion should not be allowed when it hosts datasets
2) REG-465: Node deletion should not be allowed when it still endorses organizations

 [], would you like to comment? 

Created: 2013-12-12 11:54:48.873
Updated: 2013-12-12 11:54:48.873
Cascading deletes won't be done in the Registry. See related issues, on how deletions will be performed.