[META] Remove obsolete composite entities from existing storage (garbage collection)

Created on 23 July 2016, about 8 years ago
Updated 8 February 2024, 8 months ago

Problem/Motivation

There is a set of situations where composite entities (such as Paragraphs) are not deleted from the database:
- #3016388: Manual cleanup process for obsolete composite entities
- #2834374: Support deletion of composite entities when parent field is translatable
- #2953650: Composite entities are not removed on host delete if reference was removed in prior revision

Once these issues are resolved, this issue will provide the ability to remove obsolete composite entities.

Proposed resolution

Delete all composite entities from existing storage that are no longer relevant through either:

  1. An (involuntary) database-update
  2. A batch from the Status report

Composite entities pass all checks from the related issues:
- Not used in the default revision of the host entity
- Not used in the any translation of the host entity
- Not used in earlier revisions of the host entity

Remaining tasks

  1. Write a patch
  2. Review
  3. Commit

User interface changes

To be determined.

API changes

None.

Data model changes

Obsolete composite entities are removed from existing storage

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇨🇭Switzerland miro_dietiker Switzerland

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update about 1 year ago
    Patch Failed to Apply
  • 🇵🇱Poland azovsky

    Sorry, but I would like to raise the priority level for this issue. This is (orphan paragraphs) a big problem for data analysis on large sites.

  • 🇨🇭Switzerland berdir Switzerland

    Per #21, there are only some minor and edge case situations here, plus things like the still broken views integration.

    Are you certain your "orphans" aren't just data from old revisions? that's expected and obviously still required to be kept until the host revision is deleted.

    If you have specific scenarios that do not work as expected, then create a new issue with steps to reproduce and add it to this meta.

  • 🇹🇭Thailand AlfTheCat

    I have to phase out paragraphs because of this issue. I've tried using eca to delete the orphaned paragraphs which doesn't work. Need to move to eck. I think this is an important issue.

  • 🇹🇷Turkey Umit Turkey

    "/admin/config/system/delete-orphans" you can clean orphans from this section.

  • 🇹🇭Thailand AlfTheCat

    @umit thanks, I was not aware. In my case though, I need to actually be able to react to the deletion event. I use paragraphs as a ui to automatically create commerce products and their variations. When the paragraph is deleted by an end user, so should those products and variations. That's not possible due to this issue.

  • 🇳🇴Norway steinmb

    Read though this issue, including #34, that mention there is a few separate issues that needs to be fixed. What are they, and where are they? I think the IS neeed to be updated to include what ever issues left. We might avoid noise in here, and it might give the pending issue more eyes.

  • Curious, is there a way to set a specific paragraph type as not revisioned? I have some that are revisioned and some that shouldn't be.

Production build 0.71.5 2024