Testing the upgrade path on a large site with 600k nodes and close to 300 fields, this function takes longer than the rest of the update functions combined. Some single alter table queries took over 100s and this is not a slow system (It did run the core tests in 14m 30s this week :p).

We can't do much about the execution time of the single queries but we should probably split it up and do a single table per call. It was actually able to run through with a max execution time of 30s as only a tiny fraction of the total time was spent in PHP but some servers might limit the total time. You're probably not running such a site on a server that does but still.

CommentFileSizeAuthor
#2 1943494-2.patch3.03 KBswentel
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chx’s picture

While at it:

      // Do not attempt to rename the 'language' column for fields that already
      // contain it (created during the upgrade before this update function).
      if (db_field_exists($table, 'language')) {

I strongly suspect this wanted to be langcode column: // Do not attempt to rename the 'langcode' column for fields that already otherwise the sentence + code is contradicting.

swentel’s picture

Status: Active » Needs review
FileSize
3.03 KB

This should be good.

yched’s picture

Status: Needs review » Reviewed & tested by the community

Looks good indeed.

webchick’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +D8 upgrade path

Yay more betterer upgrade path.

Committed and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.