Avoid timeout when updating large number of references

Created on 26 October 2021, about 3 years ago
Updated 6 June 2023, over 1 year ago

Problem/Motivation

Merging terms which are referenced by many nodes can easily cause a timeout.

Steps to reproduce

  1. Select a term (A) with > 10,000 references
  2. Merge term (A) into another term (B) with > 10,000 references

Proposed resolution

There are currently 2 solutions, in different issues in the term_reference_change module. Using batch api or a queueworker.

This batch api solution depends on:

✨ Use Drupal 8/9 batch API Needs review for calling batchMigrateReference (this module)
πŸ› Use Batch API to avoid timeouts when updating large number of references Needs work for introducing batchMigrateReference in the term_reference_change module

The queueWorker:

πŸ› Use QueueWorker to avoid timeouts when updating large number of references Needs work

This issue is about not deleting the terms before batch or queue is finished.

Ideally, the term merge module would provide a setting to choose between batch or queue.

Also, needs tests.

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

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.

Production build 0.71.5 2024