From 4055b64afad039066c6810e36c74955d4a85734f Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 29 Feb 2012 22:30:23 +0000 Subject: [PATCH] Fix comment from r54410, add rationale for using MySQL command line pipe --- maintenance/populateImageSha1.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maintenance/populateImageSha1.php b/maintenance/populateImageSha1.php index 4cd2747c2f..a009223412 100644 --- a/maintenance/populateImageSha1.php +++ b/maintenance/populateImageSha1.php @@ -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 ) . -- 2.20.1