jenkins-bot has submitted this change and it was merged.

Change subject: (bug 42600) (bug 24375) Fix doMaintenance.php exit procedures.
......................................................................


(bug 42600) (bug 24375) Fix doMaintenance.php exit procedures.

Fixed the post-execution calls in doMaintenance.php
to perform proper cleanup after the maintenance
script runs (modeled after MediaWiki::restInPeace).

Added a global call to wfWaitForSlaves() and then
wfDoUpdates() in doMaintenance.php to ensure that
deferred updates are always performed at the end
of maintenance scripts (and that they're performed
after the slaves catch up to avoid lag).

Also added calls to shutdown the DB factory so
that implicit transactions are committed and the
connections are closed.

Change-Id: I6f9580559d75f4761c5ddb504b2e3380e2e562a3
---
M maintenance/doMaintenance.php
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php
index f470aed..15b0016 100644
--- a/maintenance/doMaintenance.php
+++ b/maintenance/doMaintenance.php
@@ -112,8 +112,16 @@
        // Potentially debug globals
        $maintenance->globals();
 
+       // Perform deferred updates.
+       DeferredUpdates::doUpdates( 'commit' );
+
        // log profiling info
        wfLogProfilingData();
+
+       // Commit and close up!
+       $factory = wfGetLBFactory();
+       $factory->commitMasterChanges();
+       $factory->shutdown();
 } catch ( MWException $mwe ) {
        echo( $mwe->getText() );
        exit( 1 );

-- 
To view, visit https://gerrit.wikimedia.org/r/48412
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f9580559d75f4761c5ddb504b2e3380e2e562a3
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Parent5446 <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Demon <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Tim Starling <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to