In response to a report from Domas that we are seeing HTMLCacheUpdate::invalidate...
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 12 Aug 2009 05:00:30 +0000 (05:00 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 12 Aug 2009 05:00:30 +0000 (05:00 +0000)
commit748a667f5a0918fe268ff7db3be95d65721e442c
tree9795d4faae30677d11b0baf403b9b9c57580d4a0
parent154ac6816775059fcb1d784b0f59c8f4e2692a02
In response to a report from Domas that we are seeing HTMLCacheUpdate::invalidate() queries that touch hundreds of thousands of rows and cause significant slave lag:
* Check the number of rows to be updated before actually doing the query, and if it is too large, repartition the job. Due to caching and job queue lag, it is possible that the original partitioning could be pathologically inaccurate.
* Respect $wgRowsPerQuery (regression due to r47317) but increase the default from 10 to 100. It was originally chosen with a low value because I imagined that it would help reduce slave lag, but this is not generally the case since the queries may be in the same transaction.
* Fix lack of initialisation of $jobs in insertJobs() (sloppy but not a bug)
* To avoid queueing up jobs unnecessarily and to reduce the chance of jobs being repartitioned a large number of times as links are incrementally added, make the size threshold for queueing double the job size instead of equal to the job size
* Add a check of title array size to the immediate case, to avoid updating hundreds of thousands of rows when an incorrect size is stored to memcached.
includes/DefaultSettings.php
includes/HTMLCacheUpdate.php