Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/202766

Change subject: Prevent SiteStats::loadAndLazyInit from reloading in 
$wgMiserMode
......................................................................

Prevent SiteStats::loadAndLazyInit from reloading in $wgMiserMode

* Large sites can use a chron to handle accumulated drift

Bug: T95426
Change-Id: I59603a7aa329a10f8a7e4d11f3496e8f8243ca42
---
M includes/SiteStats.php
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/202766/1

diff --git a/includes/SiteStats.php b/includes/SiteStats.php
index 15c18f3..81172a1 100644
--- a/includes/SiteStats.php
+++ b/includes/SiteStats.php
@@ -68,6 +68,8 @@
         * @return bool|ResultWrapper
         */
        static function loadAndLazyInit() {
+               global $wgMiserMode;
+
                wfDebug( __METHOD__ . ": reading site_stats from slave\n" );
                $row = self::doLoad( wfGetDB( DB_SLAVE ) );
 
@@ -77,7 +79,7 @@
                        $row = self::doLoad( wfGetDB( DB_MASTER ) );
                }
 
-               if ( !self::isSane( $row ) ) {
+               if ( !$wgMiserMode && !self::isSane( $row ) ) {
                        // Normally the site_stats table is initialized at 
install time.
                        // Some manual construction scenarios may leave the 
table empty or
                        // broken, however, for instance when importing from a 
dump into a

-- 
To view, visit https://gerrit.wikimedia.org/r/202766
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I59603a7aa329a10f8a7e4d11f3496e8f8243ca42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to