} );
} );
// Commit all changes
- $factory->commitMasterChanges();
+ $factory->commitMasterChanges( __METHOD__ );
// Record ChronologyProtector positions
$factory->shutdown();
wfDebug( __METHOD__ . ': all transactions committed' );
*/
public function restInPeace( $mode = 'fast' ) {
// Assure deferred updates are not in the main transaction
- wfGetLBFactory()->commitMasterChanges();
+ wfGetLBFactory()->commitMasterChanges( __METHOD__ );
// Ignore things like master queries/connections on GET requests
// as long as they are in deferred updates (which catch errors).
// Commit and close up!
$factory = wfGetLBFactory();
- $factory->commitMasterChanges();
+ $factory->commitMasterChanges( __METHOD__ );
$factory->shutdown( LBFactory::SHUTDOWN_NO_CHRONPROT );
wfDebug( "Request ended normally\n" );
if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) {
$this->shutdownChronologyProtector( $this->chronProt );
}
- $this->commitMasterChanges(); // sanity
+ $this->commitMasterChanges( __METHOD__ ); // sanity
}
}
if ( !( $flags & self::SHUTDOWN_NO_CHRONPROT ) ) {
$this->shutdownChronologyProtector( $this->chronProt );
}
- $this->commitMasterChanges(); // sanity
+ $this->commitMasterChanges( __METHOD__ ); // sanity
}
}
foreach ( $otherUpdates as $update ) {
try {
$update->doUpdate();
- wfGetLBFactory()->commitMasterChanges();
+ wfGetLBFactory()->commitMasterChanges( __METHOD__ );
} catch ( Exception $e ) {
// We don't want exceptions thrown during deferred updates to
// be reported to the user since the output is already sent
}
// Make sure incomplete transactions are not committed and end any
// open atomic sections so that other DB updates have a chance to run
- wfGetLBFactory()->rollbackMasterChanges();
+ wfGetLBFactory()->rollbackMasterChanges( __METHOD__ );
}
}
self::getLogMessage( $e ),
self::getLogContext( $e )
);
- $factory->rollbackMasterChanges();
+ $factory->rollbackMasterChanges( __METHOD__ );
}
}
$group = JobQueueGroup::singleton();
// Flush any pending DB writes for sanity
- wfGetLBFactory()->commitAll();
+ wfGetLBFactory()->commitAll( __METHOD__ );
// Some jobs types should not run until a certain timestamp
$backoffs = array(); // map of (type => UNIX expiry)
// Commit all outstanding connections that are in a transaction
// to get a fresh repeatable read snapshot on every connection.
// Note that jobs are still responsible for handling slave lag.
- wfGetLBFactory()->commitAll();
+ wfGetLBFactory()->commitAll( __METHOD__ );
// Clear out title cache data from prior snapshots
LinkCache::singleton()->clear();
$timeMs = intval( ( microtime( true ) - $jobStartTime ) * 1000 );
) {
// Writes are all to foreign DBs, named locks don't form queues,
// or $wgJobSerialCommitThreshold is not reached; commit changes now
- wfGetLBFactory()->commitMasterChanges();
+ wfGetLBFactory()->commitMasterChanges( __METHOD__ );
return;
}
} );
// Actually commit the DB master changes
- wfGetLBFactory()->commitMasterChanges();
+ wfGetLBFactory()->commitMasterChanges( __METHOD__ );
// Release the lock
$dbwSerial->unlock( 'jobrunner-serial-commit', __METHOD__ );
// Commit and close up!
$factory = wfGetLBFactory();
-$factory->commitMasterChanges();
+$factory->commitMasterChanges( 'doMaintenance' );
$factory->shutdown();