X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FinitEditCount.php;h=96aea03472bff6545f0134d9282c41ec4fe0483b;hp=50a40180a522bdf8f1d4c9e238c0341f821e3cb8;hb=f5b9af121a07ecc674a63cbc65c3a01e9fa7d785;hpb=0acba338989197c6c187452dacf5efaa7a5838aa diff --git a/maintenance/initEditCount.php b/maintenance/initEditCount.php index 50a40180a5..96aea03472 100644 --- a/maintenance/initEditCount.php +++ b/maintenance/initEditCount.php @@ -29,8 +29,8 @@ class InitEditCount extends Maintenance { parent::__construct(); $this->addOption( 'quick', 'Force the update to be done in a single query' ); $this->addOption( 'background', 'Force replication-friendly mode; may be inefficient but - avoids locking tables or lagging slaves with large updates; - calculates counts on a slave if possible. + avoids locking tables or lagging replica DBs with large updates; + calculates counts on a replica DB if possible. Background mode will be automatically used if multiple servers are listed in the load balancer, usually indicating a replication environment.' ); @@ -42,8 +42,6 @@ in the load balancer, usually indicating a replication environment.' ); $user = $dbw->tableName( 'user' ); $revision = $dbw->tableName( 'revision' ); - $dbver = $dbw->getServerVersion(); - // Autodetect mode... if ( $this->hasOption( 'background' ) ) { $backgroundMode = true; @@ -56,7 +54,7 @@ in the load balancer, usually indicating a replication environment.' ); if ( $backgroundMode ) { $this->output( "Using replication-friendly background mode...\n" ); - $dbr = $this->getDB( DB_SLAVE ); + $dbr = $this->getDB( DB_REPLICA ); $chunkSize = 100; $lastUser = $dbr->selectField( 'user', 'MAX(user_id)', '', __METHOD__ );