Silence transaction profiler master queries notices for rollback
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 24 Oct 2018 09:48:14 +0000 (02:48 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 24 Oct 2018 09:51:44 +0000 (02:51 -0700)
Change-Id: I53f0149cbf69ee2e57fe556668dd6cbfadd79823

includes/actions/RollbackAction.php
includes/api/ApiRollback.php

index dc7b00e..7b41262 100644 (file)
@@ -69,6 +69,11 @@ class RollbackAction extends FormlessAction {
                        ] );
                }
 
+               // @TODO: remove this hack once rollback uses POST (T88044)
+               $trxLimits = $this->context->getConfig()->get( 'TrxProfilerLimits' );
+               $trxProfiler = Profiler::instance()->getTransactionProfiler();
+               $trxProfiler->setExpectations( $trxLimits['POST'], __METHOD__ );
+
                $data = null;
                $errors = $this->page->doRollback(
                        $from,
index d2ff790..e8a748b 100644 (file)
@@ -55,6 +55,11 @@ class ApiRollback extends ApiBase {
                        }
                }
 
+               // @TODO: remove this hack once rollback uses POST (T88044)
+               $trxLimits = $this->getConfig()->get( 'TrxProfilerLimits' );
+               $trxProfiler = Profiler::instance()->getTransactionProfiler();
+               $trxProfiler->setExpectations( $trxLimits['POST'], __METHOD__ );
+
                $retval = $pageObj->doRollback(
                        $this->getRbUser( $params ),
                        $summary,