Problem/Motivation
When deleting a group containing a large amount of contents and/or members, the time for processing all of the group_contents deletion in the preDelete() function may lead to error 500 due to server max execution time hit.
Steps to reproduce
- Create a group with 2000 contents & 2000 members
- Delete it via the interface
Proposed resolution
Split delete operations (especially group_contents entities deletions) into batches, to avoid hitting the server max execution time.
User interface changes
Users will now be able to follow the delete operations progress thanks to the Batch API.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | group-delete-batch-3278936-4.patch | 4.91 KB | rzb |
| #2 | group-delete-batch-3278936-2.patch | 4.89 KB | rzb |
Issue fork group-3278936
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rzb commentedComment #3
rzb commentedComment #4
rzb commentedFixed an error in the batch operations attributions.
Comment #5
awolfey commentedThis patch still applies, and it works for my case: 7k+ group members.
Comment #6
awolfey commentedOne problem with this: If you're deleting groups in Behat, the drush_backend_batch_process is not available.
Comment #9
s_leu commented