From: Aaron Schulz Date: Mon, 19 Nov 2018 19:56:49 +0000 (-0800) Subject: Avoid post-send DBPerformance log warnings for page rollback X-Git-Tag: 1.34.0-rc.0~3458^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=e79a6deea6194ed1379bcff66552616fcbd69f80;hp=66384d8dee61a4cfb07fe7d61dc604d238ad355e;p=lhc%2Fweb%2Fwiklou.git Avoid post-send DBPerformance log warnings for page rollback Change-Id: I3d4eafc7d9d04647955822d5100d8cf253d80c8a --- diff --git a/includes/actions/RollbackAction.php b/includes/actions/RollbackAction.php index c962e20d22..dec3e61535 100644 --- a/includes/actions/RollbackAction.php +++ b/includes/actions/RollbackAction.php @@ -73,6 +73,9 @@ class RollbackAction extends FormlessAction { $trxLimits = $this->context->getConfig()->get( 'TrxProfilerLimits' ); $trxProfiler = Profiler::instance()->getTransactionProfiler(); $trxProfiler->setExpectations( $trxLimits['POST'], __METHOD__ ); + DeferredUpdates::addCallableUpdate( function () use ( $trxProfiler, $trxLimits ) { + $trxProfiler->setExpectations( $trxLimits['PostSend-POST'], __METHOD__ ); + } ); $data = null; $errors = $this->page->doRollback( diff --git a/includes/api/ApiRollback.php b/includes/api/ApiRollback.php index db57f7e034..10ba4782b7 100644 --- a/includes/api/ApiRollback.php +++ b/includes/api/ApiRollback.php @@ -59,6 +59,9 @@ class ApiRollback extends ApiBase { $trxLimits = $this->getConfig()->get( 'TrxProfilerLimits' ); $trxProfiler = Profiler::instance()->getTransactionProfiler(); $trxProfiler->setExpectations( $trxLimits['POST'], __METHOD__ ); + DeferredUpdates::addCallableUpdate( function () use ( $trxProfiler, $trxLimits ) { + $trxProfiler->setExpectations( $trxLimits['PostSend-POST'], __METHOD__ ); + } ); $retval = $pageObj->doRollback( $this->getRbUser( $params ),