r83630 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83629‎ | r83630 | r83631 >
Date:02:28, 10 March 2011
Author:tstarling
Status:ok
Tags:
Comment:
MFT 83629: stats for duplicate removal
Modified paths:
  • /branches/wmf/1.17wmf1/includes/job/JobQueue.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/job/JobQueue.php
@@ -77,8 +77,13 @@
7878 $row->job_id );
7979
8080 $dbw->delete( 'job', $job->insertFields(), __METHOD__ );
 81+ $affected = $dbw->affectedRows();
8182 $dbw->commit();
8283
 84+ if ( $affected ) {
 85+ wfIncrStats( 'job-dup-delete', $affected );
 86+ }
 87+
8388 wfProfileOut( __METHOD__ );
8489 return $job;
8590 }
@@ -169,8 +174,13 @@
170175 // Deadlock prone section
171176 $dbw->begin();
172177 $dbw->delete( 'job', $job->insertFields(), __METHOD__ );
 178+ $affected = $dbw->affectedRows();
173179 $dbw->commit();
174180
 181+ if ( $affected ) {
 182+ wfIncrStats( 'job-dup-delete', $affected );
 183+ }
 184+
175185 wfProfileOut( __METHOD__ );
176186 return $job;
177187 }
Property changes on: branches/wmf/1.17wmf1/includes/job/JobQueue.php
___________________________________________________________________
Modified: svn:mergeinfo
178188 Merged /trunk/phase3/includes/job/JobQueue.php:r83629

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r83629Stats for duplicate removaltstarling02:27, 10 March 2011

Status & tagging log