[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: DB_SLAVE -> DB_REPLICA
jenkins-bot has submitted this change and it was merged. Change subject: DB_SLAVE -> DB_REPLICA .. DB_SLAVE -> DB_REPLICA Change-Id: Iebb9f8238a012b3755673502c05708d5fdcd8382 --- M includes/Cache.php M includes/Hooks.php M maintenance/PopulateDatabase.php 3 files changed, 6 insertions(+), 6 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Cache.php b/includes/Cache.php index 0d002ba..4a7b55b 100644 --- a/includes/Cache.php +++ b/includes/Cache.php @@ -53,7 +53,7 @@ * Note that this function runs multiple batches, until all records are deleted. */ public function purge( $model, $isEverything, $batchSize = 1000 ) { - $dbr = \wfGetDB( DB_SLAVE ); + $dbr = \wfGetDB( DB_REPLICA ); $dbw = \wfGetDB( DB_MASTER ); $tables = [ 'ores_classification', 'ores_model' ]; @@ -95,7 +95,7 @@ return self::$modelIds[$model]; } - $modelId = \wfGetDB( DB_SLAVE )->selectField( 'ores_model', + $modelId = \wfGetDB( DB_REPLICA )->selectField( 'ores_model', 'oresm_id', [ 'oresm_name' => $model, 'oresm_is_current' => 1 ], __METHOD__ @@ -158,7 +158,7 @@ } public function getModels() { - $models = \wfGetDB( DB_SLAVE )->selectFieldValues( 'ores_model', + $models = \wfGetDB( DB_REPLICA )->selectFieldValues( 'ores_model', 'oresm_name', [], __METHOD__ diff --git a/includes/Hooks.php b/includes/Hooks.php index 531e9d8..790f255 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -128,7 +128,7 @@ } $threshold = self::getDamagingThreshold( $wgUser ); - $dbr = \wfGetDB( DB_SLAVE ); + $dbr = \wfGetDB( DB_REPLICA ); $tables[] = 'ores_classification'; $tables[] = 'ores_model'; @@ -252,7 +252,7 @@ } $threshold = self::getDamagingThreshold( $pager->getUser() ); - $dbr = \wfGetDB( DB_SLAVE ); + $dbr = \wfGetDB( DB_REPLICA ); $query['tables'][] = 'ores_classification'; $query['tables'][] = 'ores_model'; diff --git a/maintenance/PopulateDatabase.php b/maintenance/PopulateDatabase.php index 5b35258..3d42fc3 100644 --- a/maintenance/PopulateDatabase.php +++ b/maintenance/PopulateDatabase.php @@ -45,7 +45,7 @@ $this->revisionLimit = $this->getOption( 'number', 1000 ); $latestRcId = 0; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $join_conds = [ 'ores_classification' => [ 'LEFT JOIN', [ 'oresc_rev = rc_this_oldid' ] ] ]; -- To view, visit https://gerrit.wikimedia.org/r/311221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iebb9f8238a012b3755673502c05708d5fdcd8382 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: LadsgroupGerrit-Reviewer: Aaron Schulz Gerrit-Reviewer: Aude Gerrit-Reviewer: Thiemo Mättig (WMDE) Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: DB_SLAVE -> DB_REPLICA
Ladsgroup has uploaded a new change for review. https://gerrit.wikimedia.org/r/311221 Change subject: DB_SLAVE -> DB_REPLICA .. DB_SLAVE -> DB_REPLICA Change-Id: Iebb9f8238a012b3755673502c05708d5fdcd8382 --- M includes/Cache.php M includes/Hooks.php M maintenance/PopulateDatabase.php 3 files changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES refs/changes/21/311221/1 diff --git a/includes/Cache.php b/includes/Cache.php index 0d002ba..4a7b55b 100644 --- a/includes/Cache.php +++ b/includes/Cache.php @@ -53,7 +53,7 @@ * Note that this function runs multiple batches, until all records are deleted. */ public function purge( $model, $isEverything, $batchSize = 1000 ) { - $dbr = \wfGetDB( DB_SLAVE ); + $dbr = \wfGetDB( DB_REPLICA ); $dbw = \wfGetDB( DB_MASTER ); $tables = [ 'ores_classification', 'ores_model' ]; @@ -95,7 +95,7 @@ return self::$modelIds[$model]; } - $modelId = \wfGetDB( DB_SLAVE )->selectField( 'ores_model', + $modelId = \wfGetDB( DB_REPLICA )->selectField( 'ores_model', 'oresm_id', [ 'oresm_name' => $model, 'oresm_is_current' => 1 ], __METHOD__ @@ -158,7 +158,7 @@ } public function getModels() { - $models = \wfGetDB( DB_SLAVE )->selectFieldValues( 'ores_model', + $models = \wfGetDB( DB_REPLICA )->selectFieldValues( 'ores_model', 'oresm_name', [], __METHOD__ diff --git a/includes/Hooks.php b/includes/Hooks.php index 531e9d8..790f255 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -128,7 +128,7 @@ } $threshold = self::getDamagingThreshold( $wgUser ); - $dbr = \wfGetDB( DB_SLAVE ); + $dbr = \wfGetDB( DB_REPLICA ); $tables[] = 'ores_classification'; $tables[] = 'ores_model'; @@ -252,7 +252,7 @@ } $threshold = self::getDamagingThreshold( $pager->getUser() ); - $dbr = \wfGetDB( DB_SLAVE ); + $dbr = \wfGetDB( DB_REPLICA ); $query['tables'][] = 'ores_classification'; $query['tables'][] = 'ores_model'; diff --git a/maintenance/PopulateDatabase.php b/maintenance/PopulateDatabase.php index 5b35258..3d42fc3 100644 --- a/maintenance/PopulateDatabase.php +++ b/maintenance/PopulateDatabase.php @@ -45,7 +45,7 @@ $this->revisionLimit = $this->getOption( 'number', 1000 ); $latestRcId = 0; - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $join_conds = [ 'ores_classification' => [ 'LEFT JOIN', [ 'oresc_rev = rc_this_oldid' ] ] ]; -- To view, visit https://gerrit.wikimedia.org/r/311221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iebb9f8238a012b3755673502c05708d5fdcd8382 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ORES Gerrit-Branch: master Gerrit-Owner: Ladsgroup___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits