Update to 6.x needs batch mode

Heine - January 26, 2009 - 16:54
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
Description

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.

#1

Dries - January 26, 2009 - 18:59
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

Dries - January 26, 2009 - 18:59
Assigned to:Anonymous» Dries

#3

Heine - January 27, 2009 - 09:14

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

Gábor Hojtsy - January 29, 2009 - 19:03

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

netaustin - February 7, 2009 - 01:13
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

Gábor Hojtsy - February 9, 2009 - 09:09

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

#7

Heine - February 19, 2009 - 20:29

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

dww - June 8, 2009 - 05:44
Assigned to:Dries» Anonymous

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

 
 

Drupal is a registered trademark of Dries Buytaert.