* @since 1.26
*/
$wgTrxProfilerLimits = array(
- // Basic GET and POST requests
+ // HTTP GET/HEAD requests.
+ // Master queries should not happen on GET requests
'GET' => array(
'masterConns' => 0,
'writes' => 0,
'readQueryTime' => 5
),
+ // HTTP POST requests.
+ // Master reads and writes will happen for a subset of these.
'POST' => array(
'readQueryTime' => 5,
'writeQueryTime' => 1,
$trxProfiler = Profiler::instance()->getTransactionProfiler();
$trxProfiler->setLogger( LoggerFactory::getInstance( 'DBPerformance' ) );
- // Aside from rollback, master queries should not happen on GET requests.
- // Periodic or "in passing" updates on GET should use the job queue.
- if ( !$request->wasPosted()
- && in_array( $action, array( 'view', 'edit', 'history' ) )
- ) {
- $trxProfiler->setExpectations( $wgTrxProfilerLimits['GET'], __METHOD__ );
- } else {
+ if ( $request->wasPosted() ) {
$trxProfiler->setExpectations( $wgTrxProfilerLimits['POST'], __METHOD__ );
+ } else {
+ $trxProfiler->setExpectations( $wgTrxProfilerLimits['GET'], __METHOD__ );
}
// If the user has forceHTTPS set to true, or if the user