* (bug 16656) cleanupTitles and friends should now work in load-balanced DB environme...
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 15 Dec 2008 23:37:36 +0000 (23:37 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 15 Dec 2008 23:37:36 +0000 (23:37 +0000)
commit199d238b548e8cc4f0b215d85146c73f306597f6
treee8663002524aec3236f728ffc6a1422c0e31df4f
parent7bcf8450a1d488d909185a5cf4d3eff6058f2092
* (bug 16656) cleanupTitles and friends should now work in load-balanced DB environments when $wgDBserver isn't set.
Lots of cleanup scripts are based on the FiveUpgrade class created for the 1.5 schema upgrade -- this provides a utility class designed around pulling data from a second, unbuffered connection, processing it, and stuffing it into a master connection.
Originally, both connections were created by manually instantiating the Database class. This worked as long as $wgDBserver was set, but at some point we apparently stopped setting it in our fancy-ass load-balanced environment where we're exclusively using the $wgDBservers array.
As a result, the connections used the default $wgDBserver of 'localhost' which inconveniently fails on Wikimedia's servers. ;)
Now uses the Tim-approved method of getting a new database connection -- creates a new LoadBalancer via wfGetLBFactory()->newMainLB(), then asks it for a fresh connection.
RELEASE-NOTES
maintenance/FiveUpgrade.inc