From ff120752825cf587ad84f7b7da480d387d53cca5 Mon Sep 17 00:00:00 2001 From: "Ariel T. Glenn" Date: Mon, 8 Apr 2019 09:45:55 +0300 Subject: [PATCH] avoid link cache issues with duplicate title keys for xml dumps Bug: T220316 Change-Id: If73d6c9b4cac298a7832d65ffa34bc8f69b87752 --- includes/export/XmlDumpWriter.php | 6 ++++++ 1 file changed, 6 insertions(+) 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"; } -- 2.20.1