
Problem/Motivation
#1239558: Deleting an entity with revisions and file/image field does not release file usage of non-default revisions, causing files to linger shows that we have a data loss/integrity issue when entities are deleted, since modules can and do react to hook_entity_revision_delete().
Proposed resolution
Either delete revisions individually when deleting the entity as a whole.
Or explicitly document that hook_entity_revision_delete() doesn't fire when then entity as a whole is deleted, and modules need to account for that case in hook_entity_delete()
Comments
Comment #2
catchComment #3
dawehnerWhat do we do with entity translations? They could have the exact same problem as well.
Comment #6
wim leersComment #10
anavarreIIUC Wim's comment in #1239558-126: Deleting an entity with revisions and file/image field does not release file usage of non-default revisions, causing files to linger this should be postponed on #89181: Use queue API for node and comment, user, node multiple deletes.