Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[update:execute] Batch updates are not supported #3929

Open
longwave opened this issue Sep 10, 2018 · 3 comments
Open

[update:execute] Batch updates are not supported #3929

longwave opened this issue Sep 10, 2018 · 3 comments

Comments

@longwave
Copy link

Problem/Motivation

In https://www.drupal.org/project/drupal/issues/2997960 it was identified that taxonomy_update_8502() is not run correctly via update:execute when more than 100 terms are present in the database.

hook_update_N allows long running update operations to be batched via the $context parameter, as documented at https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension%21module.api.php/function/hook_update_N/8.6.x but it appears Drupal Console does not implement this, as per https://github.com/hechoendrupal/drupal-console/blob/master/src/Command/Update/ExecuteCommand.php#L338-L340 which only ever runs the update hook once.

How to reproduce

  • Start on Drupal 8.5.x and add over 100 taxonomy terms
  • Upgrade to Drupal 8.6.x and run update:execute
  • Note that only the first 100 taxonomy terms are correctly migrated correctly to the new parent field structure during taxonomy_update_8502()

Solution

Implement batch updates during update:execute.

See also

#3574
#3787

@enzolutions
Copy link
Contributor

@rlmumford we could close this issue after merge #4057 ?

@rlmumford
Copy link
Contributor

@enzolutions I believe we can

@enzolutions
Copy link
Contributor

Awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants