jenkins-bot has submitted this change and it was merged.

Change subject: Cleaned up recache() to behave more like the parent method
......................................................................


Cleaned up recache() to behave more like the parent method

Change-Id: I4e75ff2aa4a31e97db7366d0a0a3cb470d53126b
---
M specials/SpecialDisambiguationPageLinks.php
1 file changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/specials/SpecialDisambiguationPageLinks.php 
b/specials/SpecialDisambiguationPageLinks.php
index de4cdc1..40d0ae9 100644
--- a/specials/SpecialDisambiguationPageLinks.php
+++ b/specials/SpecialDisambiguationPageLinks.php
@@ -110,8 +110,6 @@
                }
 
                try {
-                       // Clear out any old cached data
-                       $dbw->delete( 'querycachetwo', array( 'qcc_type' => 
$this->getName() ), $fname );
                        // Do query
                        $res = $this->reallyDoQuery( $limit, false );
                        $num = false;
@@ -140,6 +138,9 @@
                                        );
                                }
 
+                               $dbw->startAtomic( __METHOD__ );
+                               // Clear out any old cached data
+                               $dbw->delete( 'querycachetwo', array( 
'qcc_type' => $this->getName() ), $fname );
                                // Save results into the querycachetwo table on 
the master
                                if ( count( $vals ) ) {
                                        $dbw->insert( 'querycachetwo', $vals, 
__METHOD__ );
@@ -151,6 +152,7 @@
                                        array( 'qci_type' => $this->getName(), 
'qci_timestamp' => $dbw->timestamp() ),
                                        $fname
                                );
+                               $dbw->endAtomic( __METHOD__ );
                        }
                } catch ( DBError $e ) {
                        if ( !$ignoreErrors ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/204273
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e75ff2aa4a31e97db7366d0a0a3cb470d53126b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Disambiguator
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to