$this->assertOpen();
$this->runOnTransactionPreCommitCallbacks();
- $writeTime = $this->pendingWriteQueryDuration();
+ $writeTime = $this->pendingWriteQueryDuration( self::ESTIMATE_DB_APPLY );
$this->doCommit( $fname );
if ( $this->mTrxDoneWrites ) {
$this->mDoneWrites = microtime( true );
private function commitMasterChanges( LBFactory $lbFactory, Job $job, $fnameTrxOwner ) {
global $wgJobSerialCommitThreshold;
+ $time = false;
$lb = $lbFactory->getMainLB( wfWikiID() );
if ( $wgJobSerialCommitThreshold !== false && $lb->getServerCount() > 1 ) {
// Generally, there is one master connection to the local DB
return;
}
- $ms = intval( 1000 * $dbwSerial->pendingWriteQueryDuration() );
+ $ms = intval( 1000 * $time );
$msg = $job->toString() . " COMMIT ENQUEUED [{$ms}ms of writes]";
$this->logger->info( $msg );
$this->debugCallback( $msg );