Merge "Silence transaction profiler master queries notices for rollback"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 25 Oct 2018 21:27:08 +0000 (21:27 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 25 Oct 2018 21:27:08 +0000 (21:27 +0000)
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 c9ff260..db57f7e 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,