Fix QueryPage transaction plan
authorTim Starling <tstarling@wikimedia.org>
Wed, 11 Dec 2013 00:57:00 +0000 (11:57 +1100)
committerTim Starling <tstarling@wikimedia.org>
Wed, 11 Dec 2013 00:57:00 +0000 (11:57 +1100)
commit2be2abf30f8996bce84a4cb302c7ab2c5bded3ea
treef58994e5fb1682990424081c2fa3debbb9dfae4f
parent758707593a885a177dd1cd4c5b9a909746b9a345
Fix QueryPage transaction plan

The COMMIT in updateSpecialPages.php was unmatched and just logged an
error. We would like the stale results to still be presented to the user
during the hours of query execution time, so doing a DELETE in
autocommit mode before the main query starts does not seem appropriate.
And holding a master transaction open for hours, with a lock on
querycache, is certainly not the right way to do it.

So, move the DELETE to after the completion of the main query, and wrap
a transaction around the updates to querycache and querycache_info so
that the user always sees a consistent populated UI. Remove the
unmatched COMMIT from updateSpecialPages.php.

Change-Id: I27c22b96f43a1064eb17a0c6a1c56d1f4a2dff9a
includes/QueryPage.php
maintenance/updateSpecialPages.php