From: Ariel T. Glenn Date: Mon, 8 Apr 2019 06:45:55 +0000 (+0300) Subject: avoid link cache issues with duplicate title keys for xml dumps X-Git-Tag: 1.34.0-rc.0~2086^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=ff120752825cf587ad84f7b7da480d387d53cca5 avoid link cache issues with duplicate title keys for xml dumps Bug: T220316 Change-Id: If73d6c9b4cac298a7832d65ffa34bc8f69b87752 --- diff --git a/includes/export/XmlDumpWriter.php b/includes/export/XmlDumpWriter.php index 6ca8853ca6..2ae5c2fa4e 100644 --- a/includes/export/XmlDumpWriter.php +++ b/includes/export/XmlDumpWriter.php @@ -207,6 +207,12 @@ class XmlDumpWriter { * @return string */ function closePage() { + if ( $this->currentTitle !== null ) { + $linkCache = MediaWikiServices::getInstance()->getLinkCache(); + // In rare cases, link cache has the same key for some pages which + // might be read as part of the same batch. T220424 and T220316 + $linkCache->clearLink( $this->currentTitle ); + } return " \n"; }