} );
} );
// Commit all changes
- $factory->commitMasterChanges();
+ $factory->commitMasterChanges( __METHOD__ );
// Record ChronologyProtector positions
$factory->shutdown();
wfDebug( __METHOD__ . ': all transactions committed' );
$request = $context->getRequest();
if ( $request->wasPosted() && $factory->hasOrMadeRecentMasterChanges() ) {
$expires = time() + $config->get( 'DataCenterUpdateStickTTL' );
- $request->response()->setCookie( 'UseDC', 'master', $expires, array( 'prefix' => '' ) );
+ $options = array( 'prefix' => '' );
+ $request->response()->setCookie( 'UseDC', 'master', $expires, $options );
+ $request->response()->setCookie( 'UseCDNCache', 'false', $expires, $options );
}
// Avoid letting a few seconds of slave lag cause a month of stale data
*/
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" );