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.

Issue fork group-3278936

Command icon 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

rzb created an issue. See original summary.

rzb’s picture

Status: Active » Needs review
StatusFileSize
new4.89 KB
rzb’s picture

Assigned: rzb » Unassigned
rzb’s picture

StatusFileSize
new4.91 KB

Fixed an error in the batch operations attributions.

awolfey’s picture

Status: Needs review » Reviewed & tested by the community

This patch still applies, and it works for my case: 7k+ group members.

awolfey’s picture

One problem with this: If you're deleting groups in Behat, the drush_backend_batch_process is not available.

s_leu made their first commit to this issue’s fork.

s_leu’s picture

Status: Reviewed & tested by the community » Needs review

s_leu changed the visibility of the branch 3278936-batched-group-delete-2.2.2 to hidden.

mhh made their first commit to this issue’s fork.