When deleting collections, work, or files, it's possible the delete process might fail. For collections and works, we can report this error to the user, and resource might still be visible in the search results; however, it might not. There are possible edge cases where a resource is removed from Postgres, but not Solr, and vice-versa.
For files, the problem is different. If work's file fails to delete, how do we report that and fix it? Conversely, if a work is removed, but not its file, then there is an orphaned resource.
One solution might be to have reporting checkups that alert admins when there are orphaned resources or mismatches between Solr and Postgres records.
+1 for admin alert when they are orphaned resources or Solr/Postgres mismatches. We have a lot of orphan content for compound objects in CDM and they are a real pain in the tuchus.
When deleting collections, work, or files, it's possible the delete process might fail. For collections and works, we can report this error to the user, and resource might still be visible in the search results; however, it might not. There are possible edge cases where a resource is removed from Postgres, but not Solr, and vice-versa.
For files, the problem is different. If work's file fails to delete, how do we report that and fix it? Conversely, if a work is removed, but not its file, then there is an orphaned resource.
One solution might be to have reporting checkups that alert admins when there are orphaned resources or mismatches between Solr and Postgres records.