From 8aeedcbabd2f031e35e5522fed46f5b908c17949 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 9 Mar 2018 03:32:30 -0800 Subject: [PATCH] Cleanup some comments related to DB replication Change-Id: Icaaa5144beaedfebb88530480733a1e916c935fb --- includes/MediaWiki.php | 2 +- includes/jobqueue/jobs/ClearUserWatchlistJob.php | 4 ++-- includes/watcheditem/WatchedItemStore.php | 2 +- maintenance/migrateArchiveText.php | 2 +- maintenance/resetUserTokens.php | 1 - 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 6c932d2a2e..b3abe7cfca 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -861,7 +861,7 @@ class MediaWiki { $this->performRequest(); // GUI-ify and stash the page output in MediaWiki::doPreOutputCommit() while - // ChronologyProtector synchronizes DB positions or slaves accross all datacenters. + // ChronologyProtector synchronizes DB positions or replicas accross all datacenters. $buffer = null; $outputWork = function () use ( $output, &$buffer ) { if ( $buffer === null ) { diff --git a/includes/jobqueue/jobs/ClearUserWatchlistJob.php b/includes/jobqueue/jobs/ClearUserWatchlistJob.php index 3e8b2ad3e4..77adfa1a94 100644 --- a/includes/jobqueue/jobs/ClearUserWatchlistJob.php +++ b/includes/jobqueue/jobs/ClearUserWatchlistJob.php @@ -53,7 +53,7 @@ class ClearUserWatchlistJob extends Job { // Wait before lock to try to reduce time waiting in the lock. if ( !$loadBalancer->safeWaitForMasterPos( $dbr ) ) { - $this->setLastError( 'Timed out while waiting for slave to catch up before lock' ); + $this->setLastError( 'Timed out waiting for replica to catch up before lock' ); return false; } @@ -66,7 +66,7 @@ class ClearUserWatchlistJob extends Job { } if ( !$loadBalancer->safeWaitForMasterPos( $dbr ) ) { - $this->setLastError( 'Timed out while waiting for slave to catch up within lock' ); + $this->setLastError( 'Timed out waiting for replica to catch up within lock' ); return false; } diff --git a/includes/watcheditem/WatchedItemStore.php b/includes/watcheditem/WatchedItemStore.php index 35e824e036..1b37968843 100644 --- a/includes/watcheditem/WatchedItemStore.php +++ b/includes/watcheditem/WatchedItemStore.php @@ -693,7 +693,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac } // Update process cache to ensure skin doesn't claim that the current // page is unwatched in the response of action=watch itself (T28292). - // This would otherwise be re-queried from a slave by isWatched(). + // This would otherwise be re-queried from a replica by isWatched(). foreach ( $items as $item ) { $this->cache( $item ); } diff --git a/maintenance/migrateArchiveText.php b/maintenance/migrateArchiveText.php index e9beaa350e..60dbea1ea9 100644 --- a/maintenance/migrateArchiveText.php +++ b/maintenance/migrateArchiveText.php @@ -143,7 +143,7 @@ class MigrateArchiveText extends LoggedUpdateMaintenance { } $this->output( "... $last\n" ); - // $this->commitTransaction() already waited for slaves, no need to re-wait here. + // $this->commitTransaction() already waited for replication; no need to re-wait here } $this->output( "Completed ar_text migration, $count rows updated, $errors missing data.\n" ); diff --git a/maintenance/resetUserTokens.php b/maintenance/resetUserTokens.php index 235b37f710..284db2c22e 100644 --- a/maintenance/resetUserTokens.php +++ b/maintenance/resetUserTokens.php @@ -68,7 +68,6 @@ class ResetUserTokens extends Maintenance { } // We list user by user_id from one of the replica DBs - // We list user by user_id from one of the slave database $dbr = $this->getDB( DB_REPLICA ); $where = []; -- 2.20.1