Tim Starling wrote:
Modified Files: Tag: REL1_3 DefaultSettings.php MessageCache.php Setup.php Log Message: allow messages to be drawn from another database, off by default
This still requires the secondary database to be on the same server as the main database, doesn't it?
Timwi wrote:
Tim Starling wrote:
Modified Files: Tag: REL1_3 DefaultSettings.php MessageCache.php Setup.php Log Message: allow messages to be drawn from another database, off by default
This still requires the secondary database to be on the same server as the main database, doesn't it?
Yes, but it's a trivial modification if you wish it to be otherwise. Configure the second server with zero load allocation. Then just grab a connection to the desired server using wfGetDB() in MessageCache::loadFromDB(). Say if you give it an index of 10, then the appropriate code would be:
if ( $this->mSecondaryDB ) { # Load from fallback $db =& wfGetDB( 10 ); $sql = "SELECT cur_title,cur_text FROM {$this->mSecondaryDB}.cur WHERE cur_is_redirect=0 AND cur_namespace=" . NS_MEDIAWIKI; $res = $db->query( $sql, $fname ); $this->mCache = array(); for ( $row = $db->fetchObject( $res ); $row; $row = $db->fetchObject( $res ) ) { $this->mCache[$row->cur_title] = $row->cur_text; } }
wikitech-l@lists.wikimedia.org