From 62b8db6ea5989cdb8cbae170aeb120c7421193ca Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 27 Mar 2019 19:11:17 -0700 Subject: [PATCH] objectcache: remove some unneeded code from BagOStuff::mergeViaCas Change-Id: Ib92090fe4e1b1eb2c4f9e031f8476b24189392c8 --- includes/libs/objectcache/BagOStuff.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index 5669366595..0dd7b57c6d 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -288,13 +288,10 @@ abstract class BagOStuff implements IExpiringStore, LoggerAwareInterface { */ protected function mergeViaCas( $key, $callback, $exptime = 0, $attempts = 10, $flags = 0 ) { do { - $this->clearLastError(); - $reportDupes = $this->reportDupes; - $this->reportDupes = false; $casToken = null; // passed by reference + // Get the old value and CAS token from cache + $this->clearLastError(); $currentValue = $this->doGet( $key, self::READ_LATEST, $casToken ); - $this->reportDupes = $reportDupes; - if ( $this->getLastError() ) { $this->logger->warning( __METHOD__ . ' failed due to I/O error on get() for {key}.', -- 2.20.1