Addshore has uploaded a new change for review.
https://gerrit.wikimedia.org/r/302291
Change subject: Revert "Silence the TransactionProfiler in
masterRunningReadOnly()"
......................................................................
Revert "Silence the TransactionProfiler in masterRunningReadOnly()"
This reverts commit a2e3ae5e18cc4f8baefe7fccdb7ed18e0407a325.
Change-Id: I9abe4f7414faf4120441940f76368669f84d0cde
---
M includes/db/loadbalancer/LoadBalancer.php
M includes/profiler/TransactionProfiler.php
2 files changed, 2 insertions(+), 19 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/91/302291/1
diff --git a/includes/db/loadbalancer/LoadBalancer.php
b/includes/db/loadbalancer/LoadBalancer.php
index dbf031e..2543958 100644
--- a/includes/db/loadbalancer/LoadBalancer.php
+++ b/includes/db/loadbalancer/LoadBalancer.php
@@ -1314,15 +1314,12 @@
$cache->makeGlobalKey( __CLASS__, 'server-read-only',
$masterServer ),
self::TTL_CACHE_READONLY,
function () use ( $wiki, $conn ) {
- $this->trxProfiler->setSilenced( true );
try {
$dbw = $conn ?: $this->getConnection(
DB_MASTER, [], $wiki );
- $readOnly =
(int)$dbw->serverIsReadOnly();
+ return (int)$dbw->serverIsReadOnly();
} catch ( DBError $e ) {
- $readOnly = 0;
+ return 0;
}
- $this->trxProfiler->setSilenced( false );
- return $readOnly;
},
[ 'pcTTL' => $cache::TTL_PROC_LONG, 'busyValue' => 0 ]
);
diff --git a/includes/profiler/TransactionProfiler.php
b/includes/profiler/TransactionProfiler.php
index bf26573..1aba71c 100644
--- a/includes/profiler/TransactionProfiler.php
+++ b/includes/profiler/TransactionProfiler.php
@@ -38,8 +38,6 @@
protected $dbLockThreshold = 3.0;
/** @var float Seconds */
protected $eventThreshold = .25;
- /** @var bool */
- protected $silenced = false;
/** @var array transaction ID => (write start time, list of DBs
involved) */
protected $dbTrxHoldingLocks = [];
@@ -77,14 +75,6 @@
public function setLogger( LoggerInterface $logger ) {
$this->logger = $logger;
- }
-
- /**
- * @param bool $value
- * @since 1.28
- */
- public function setSilenced( $value ) {
- $this->silenced = $value;
}
/**
@@ -312,10 +302,6 @@
* @param string|float|int $actual [optional]
*/
protected function reportExpectationViolated( $expect, $query, $actual
= null ) {
- if ( $this->silenced ) {
- return;
- }
-
$n = $this->expect[$expect];
$by = $this->expectBy[$expect];
$actual = ( $actual !== null ) ? " (actual: $actual)" : "";
--
To view, visit https://gerrit.wikimedia.org/r/302291
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9abe4f7414faf4120441940f76368669f84d0cde
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits