Merge "avoid link cache issues with duplicate title keys for xml dumps"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 9 Apr 2019 14:00:38 +0000 (14:00 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 9 Apr 2019 14:00:38 +0000 (14:00 +0000)
includes/export/XmlDumpWriter.php

index 9d14442..54249a8 100644 (file)
@@ -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 "  </page>\n";
        }