According to docs/database.txt (thanks Tim for writing this useful text),
database reads should use wfGetDB( DB_SLAVE ). However, when browsing
through the code, I found the following definition of Article::getDB() :
/**
* Get the database which should be used for reads
*
* @return Database
*/
function &getDB() {
$ret =& wfGetDB( DB_MASTER );
return $ret;
}
As far as I can see, the Database object returned by this function is used
to load the contents of the article.
Why is DB_MASTER used instead of DB_SLAVE?
Jitse
Show replies by thread