User "Brion VIBBER" posted a comment on MediaWiki.r79518.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/79518#c19558
Commit summary:

* Modified Article::loadPageData() to use a slave database connection and 
pageDataFromTitle() instead of pageDataFromId() in the default case, as in 
Wiki.php (this also saves a query since the ID will be fetched with other 
fileds)
* Removed the loadPageData() call for the initial article in Wiki.php, will be 
triggered by the isRedirect() call 7 lines below if needed (this was not needed 
if $target is set by the InitializeArticleMaybeRedirect hook), but kept the 
second one (same as above, Article::exists() triggers Title::getArticleId() 
that would use one query to get id and a second one is needed to get the 
complete page data)
* Modified Article::fetchContent() to use common code (loadPageData()) and to 
only call it if really needed

Comment:

I'm pretty sure we've gone back and forth on this sort of thing several times 
over the years...

Reading page data from the slave is dangerous as it may be out of date.

Reading page data from the master is potentially slow as it slams the master 
with more activity.

"In theory" what we're supposed to be doing I think is something like 'grab the 
most basic page/revision row from master' for reliability, followed by being 
able to load the page text and do rendering existence checks etc etc on the 
slave.


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

Reply via email to