When a site (say Drupal.org) has lots of comments, updating might not complete in 30 s. comment_upload_update_6000 needs a batch mode.

CommentFileSizeAuthor
#1 batch-upgrade-d5-to-d6.patch2.82 KBdries

Comments

dries’s picture

Status: Active » Needs review
Issue tags: +drupal.org upgrade
StatusFileSize
new2.82 KB

Here is a first crack at implementing a batch upgrade path to go from D5 to D6. I have not yet tested it on a large site but it seems to work on a small, local test website. I'll have a fresh look at it in a couple of hours -- in the mean time, feel free to do a quick review or do do some testing.

dries’s picture

Assigned: Unassigned » dries
heine’s picture

Looks good except for the potential notice on $_SESSION['comment_upload_update_6000']++. Is there a reason for the count, or could we simply use this as a flag?

gábor hojtsy’s picture

Run on a drupal.org database dump on a beefy server seems to be not affected by any timeout. However, it does not guarantee that the run on drupal.org will not get timed out.

netaustin’s picture

Status: Needs review » Active

The updated code uses two "select into" queries for speed rather than looping if db = mysql. Setting back to active so I remember to patch for non-mysql databases.

gábor hojtsy’s picture

Issue tags: -drupal.org upgrade

Since drupal.org uses MySQL and this has good performance on MySQL, it works for us.

heine’s picture

I found http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/comment_upl..., apparently slipped in with another commit (?).

Needs a rollback, as this FUBARed the files table of do.

  if (substr($db_url, 0, 5) == 'mysql') {

David Strauss:

Doesn't work when $db_url is an array. ($db_type should be used).

autoincrement is not consistent between table engines; the INSERT INTO .. SELECT has to go.

dww’s picture

Assigned: dries » Unassigned
Issue tags: +6.x-1.0 blocker

This should get cleaned up and resolved before a 6.x-1.0 release.