Group relationship saving/deletion resaves entities without using ::setSyncing()

Created on 1 October 2024, about 2 months ago

Problem/Motivation

We had a custom update that deleted and created multiple group memberships, and some additional custom code running on user save. This led to a very long running update because users are saved when memberships are created or deleted.

I checked git blame and this code was added to groups in 2016. I am guessing that with variation cache + cache tags that it should not be necessary to save entities any more, even if we possibly wanted to invalidate their cache tags 'just in case'.

However regardless of that, the code could definitely set the entities to syncing so that custom code can skip running certain things.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.3

Component

Code

Created by

🇬🇧United Kingdom catch

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024