diff options
author | Tyler Anthony Romeo <tylerromeo@gmail.com> | 2013-02-10 22:21:30 -0500 |
---|---|---|
committer | Tyler Anthony Romeo <tylerromeo@gmail.com> | 2013-02-20 14:25:44 -0500 |
commit | c628b6d121b49319e783dd80f7cae4284807634b (patch) | |
tree | 3921ea8cc7f864f7ee7c3d179503e3e04c72a77e /maintenance/doMaintenance.php | |
parent | 7989953e8b1971abe5dc34048f79d22c3eb2823a (diff) | |
download | mediawikicore-c628b6d121b49319e783dd80f7cae4284807634b.tar.gz mediawikicore-c628b6d121b49319e783dd80f7cae4284807634b.zip |
(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
Diffstat (limited to 'maintenance/doMaintenance.php')
-rw-r--r-- | maintenance/doMaintenance.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index f470aedb5c64..15b00167d2ee 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -112,8 +112,16 @@ try { // 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 ); |