By default, slaves are used for the existence check. However, in the case
of importing many revisions of the one page, the chances are that they
won't have caught up to the fact that that page has just been created,
causing site statistics to be incorrectly updated. We need to use the
master DB for this check.
Bug: 40009
Change-Id: I301353fb976a982f58635b87d9960d81fc541d14
$linkCache->clear();
$page = WikiPage::factory( $this->title );
+ $page->loadPageData( 'fromdbmaster' );
if ( !$page->exists() ) {
# must create the page...
$pageId = $page->insertOn( $dbw );