X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=includes%2FSiteStats.php;h=ff7875c9480b34d2a3b23a413c3a0f226b77e8a7;hb=9964ca1a390c446397dcd466916ffed356cdc3c9;hp=604ab93f7f391efca896d9a11f0ef7252793c844;hpb=fd8a5d468934398595874783fa75ae2bf1b2b482;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SiteStats.php b/includes/SiteStats.php index 604ab93f7f..ff7875c948 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -59,7 +59,7 @@ class SiteStats { # Update schema $u = new SiteStatsUpdate( 0, 0, 0 ); $u->doUpdate(); - self::$row = self::doLoad( wfGetDB( DB_SLAVE ) ); + self::$row = self::doLoad( wfGetDB( DB_REPLICA ) ); } self::$loaded = true; @@ -71,12 +71,12 @@ class SiteStats { static function loadAndLazyInit() { global $wgMiserMode; - wfDebug( __METHOD__ . ": reading site_stats from slave\n" ); - $row = self::doLoad( wfGetDB( DB_SLAVE ) ); + wfDebug( __METHOD__ . ": reading site_stats from replica DB\n" ); + $row = self::doLoad( wfGetDB( DB_REPLICA ) ); if ( !self::isSane( $row ) ) { // Might have just been initialized during this request? Underflow? - wfDebug( __METHOD__ . ": site_stats damaged or missing on slave\n" ); + wfDebug( __METHOD__ . ": site_stats damaged or missing on replica DB\n" ); $row = self::doLoad( wfGetDB( DB_MASTER ) ); } @@ -87,7 +87,7 @@ class SiteStats { // clean schema with mwdumper. wfDebug( __METHOD__ . ": initializing damaged or missing site_stats\n" ); - SiteStatsInit::doAllAndCommit( wfGetDB( DB_SLAVE ) ); + SiteStatsInit::doAllAndCommit( wfGetDB( DB_REPLICA ) ); $row = self::doLoad( wfGetDB( DB_MASTER ) ); } @@ -186,7 +186,7 @@ class SiteStats { wfMemcKey( 'SiteStats', 'groupcounts', $group ), $cache::TTL_HOUR, function ( $oldValue, &$ttl, array &$setOpts ) use ( $group ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $setOpts += Database::getCacheSetOptions( $dbr ); @@ -229,7 +229,7 @@ class SiteStats { */ static function pagesInNs( $ns ) { if ( !isset( self::$pageCount[$ns] ) ) { - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); self::$pageCount[$ns] = (int)$dbr->selectField( 'page', 'COUNT(*)', @@ -296,7 +296,7 @@ class SiteStatsInit { } elseif ( $database ) { $this->db = wfGetDB( DB_MASTER ); } else { - $this->db = wfGetDB( DB_SLAVE, 'vslow' ); + $this->db = wfGetDB( DB_REPLICA, 'vslow' ); } }