Deleting a node deletes the linked group_content entities which then resaves the node

Created on 29 January 2019, about 6 years ago
Updated 8 January 2025, 3 months ago

Problem/Motivation

We had some issues that we ended up with incomplete and partial nodes that broke admin/content and other places that queried for nodes and then loaded them.

This behavior only happened in combination with redis as cache backend and is not easily reproducable, but I've been doing load testing with jmeter where I created, updated and deleted a lot of nodes and then it happens regularly.

The entity storage then tries to update an entity that was already deleted, so it re-inserts the records into most tables, except node, which it tries to update but doesn't find any rows to update. Might also be worthwhile to open an issue in core to prevent that inconsistency.

Setting to major because this can kill your site in a way that can only be recovered with doing manual insert queries in the database.

Proposed resolution

Add a flag to GroupContent that does not attempt to delete the referenced entity when doing a cascading deletion.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡­Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
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.

  • πŸ‡ΊπŸ‡ΈUnited States mediabounds

    I am still periodically running into this problem on Group 2.x when the group relationship for the deleted entity is already in the in-memory cache. Attaching a patch with the same approach as #13 for Group 2.x.

Production build 0.71.5 2024