Project:Comment Upload
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:active
Issue tags:6.x-1.0 blocker

Issue Summary

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.

Comments

#1

Status:active» needs review

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.

AttachmentSize
batch-upgrade-d5-to-d6.patch 2.82 KB

#2

Assigned to:Anonymous» Dries

#3

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?

#4

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.

#5

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.

#6

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

#7

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.

#8

Assigned to:Dries» Anonymous

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