Fix comment from r54410, add rationale for using MySQL command line pipe
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 29 Feb 2012 22:30:23 +0000 (22:30 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 29 Feb 2012 22:30:23 +0000 (22:30 +0000)
maintenance/populateImageSha1.php

index 4cd2747..a009223 100644 (file)
@@ -74,7 +74,10 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance {
                $imageTable = $dbw->tableName( 'image' );
 
                if ( $method == 'pipe' ) {
-                       // @todo FIXME: Kill this and replace with a second unbuffered DB connection.
+                       // Opening a pipe allows the SHA-1 operation to be done in parallel 
+                       // with the database write operation, because the writes are queued
+                       // in the pipe buffer. This can improve performance by up to a 
+                       // factor of 2. 
                        global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname;
                        $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) .
                                ' -h' . wfEscapeShellArg( $wgDBserver ) .