Use Batch API to avoid timeouts when updating large number of references

Created on 25 May 2020, over 4 years ago
Updated 26 April 2024, 7 months ago

There are 3 issues i discovered with the module -

1. If the term we are trying to remap to a new term is used in a large number of nodes, a memory exhaustion error occurs.
2. Remapping does not happen in entity revisions, it only happens in published version.
3. [Update: These kind of scenarios should be tackled in custom module by injecting customReferenceFinderService which finds the custom entity reference field references. Removing this requirement.]

Steps to reproduce -
1. Tag thousand nodes with the same term and then remap it using this module API to new term. It throws memory exhaustion error.
2. Tag a term to draft node, then remap using this module to new term. Term in draft remains the same.

I recommend using batch process for remapping. Will submit patch asap.

๐Ÿ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia deepak_123

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

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