Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/312461
Change subject: Minor installer/upgrader cleanups ...................................................................... Minor installer/upgrader cleanups Change-Id: I6352d16dce242c94203bdf7d020f1c0279fec6e5 --- M includes/installer/DatabaseInstaller.php M includes/installer/DatabaseUpdater.php M includes/libs/rdbms/database/Database.php 3 files changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/61/312461/1 diff --git a/includes/installer/DatabaseInstaller.php b/includes/installer/DatabaseInstaller.php index 4f10367..161740b 100644 --- a/includes/installer/DatabaseInstaller.php +++ b/includes/installer/DatabaseInstaller.php @@ -167,7 +167,7 @@ * * @param string $sourceFileMethod * @param string $stepName - * @param string $archiveTableMustNotExist + * @param bool $archiveTableMustNotExist * @return Status */ private function stepApplySourceFile( @@ -355,7 +355,7 @@ $up->doUpdates(); } catch ( Exception $e ) { echo "\nAn error occurred:\n"; - echo $e->getText(); + echo $e->getMessage(); $ret = false; } $up->purgeCache(); diff --git a/includes/installer/DatabaseUpdater.php b/includes/installer/DatabaseUpdater.php index 0d0da08..2425005 100644 --- a/includes/installer/DatabaseUpdater.php +++ b/includes/installer/DatabaseUpdater.php @@ -20,6 +20,7 @@ * @file * @ingroup Deployment */ +use MediaWiki\MediaWikiServices; require_once __DIR__ . '/../../maintenance/Maintenance.php'; @@ -456,6 +457,8 @@ * @param bool $passSelf Whether to pass this object we calling external functions */ private function runUpdates( array $updates, $passSelf ) { + $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory(); + $updatesDone = []; $updatesSkipped = []; foreach ( $updates as $params ) { @@ -470,7 +473,7 @@ flush(); if ( $ret !== false ) { $updatesDone[] = $origParams; - wfGetLBFactory()->waitForReplication(); + $lbFactory->waitForReplication(); } else { $updatesSkipped[] = [ $func, $params, $origParams ]; } diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index f56f380..bea24a9 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -30,7 +30,7 @@ * Database abstraction object * @ingroup Database */ -abstract class Database implements IDatabase, LoggerAwareInterface { +abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAwareInterface { /** Number of times to re-try an operation in case of deadlock */ const DEADLOCK_TRIES = 4; /** Minimum time to wait before retry, in microseconds */ -- To view, visit https://gerrit.wikimedia.org/r/312461 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6352d16dce242c94203bdf7d020f1c0279fec6e5 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